Skip to content

Commit d734976

Browse files
committed
fixes
1 parent 6b9f8e2 commit d734976

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

infrastructure/systems/GNU-Parallel/aurpkg/scripts/pacaur.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,18 @@ pkgbuild="https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h"
4444

4545
run_tests() {
4646
pkg="$1"
47-
out_dir="$2"
47+
mkcd "${OUT}/$pkg" || exit 1
4848

49-
mkcd "${out_dir}/$pkg" || exit 1
49+
curl --insecure -o PKGBUILD "$pkgbuild=$pkg" 2>/dev/null || echo ' '
5050

51-
curl --insecure -o PKGBUILD "$pkgbuild=$pkg" 2> /dev/null || echo ' '
52-
53-
# Info: Fetch required PGP keys from PKGBUILD (commented in the original script)
51+
# Fetch required pgp keys from PKGBUILD (optional)
5452
# gpg --recv-keys $(sed -n "s:^validpgpkeys=('\([0-9A-Fa-fx]\+\)').*$:\1:p" PKGBUILD)
53+
# Some failure is expected here, so we ignore the return code
5554
makedeb -d >> "../$pkg.txt" 2>&1
5655
cd - > /dev/null || exit 1
5756
}
58-
export -f run_tests
57+
export -f run_tests mkcd
5958
export pkgbuild
6059

6160
# Read package names from the input file and process them in parallel
62-
cat "$IN" | tr '\n' ' ' | parallel --jobs "$(nproc)" run_tests {} "$OUT"
61+
parallel run_tests :::: "$IN"

infrastructure/systems/Shark/max-temp/scripts/temp-analytics.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
[[ -n "$input_file" ]] || { echo "script was not provided with \$input_file"; exit 1; }
2626
[[ -n "$statistics_dir" ]] || { echo "script was not provided with \$statistics_dir"; exit 1; }
2727

28-
mkdir -p "$statistics_dir"
29-
30-
cut -c 89-92 "$input_file" |
31-
grep -v 999 |
32-
sort -n |
33-
tee >(head -n1 > "${statistics_dir}/min.txt") \
34-
>(tail -n1 > "${statistics_dir}/max.txt") |
35-
awk '{ total += $1; count++ } END { print total/count }' > "${statistics_dir}/average.txt"
28+
mkdir -p "${statistics_dir}"
29+
30+
tee < "${input_file}" | cut -c 89-92 | grep -v 999 | sort -rn | head -n1 > "${statistics_dir}/max.txt" &
31+
tee < "${input_file}" | cut -c 89-92 | grep -v 999 | sort -n | head -n1 > "${statistics_dir}/min.txt" &
32+
tee < "${input_file}" | cut -c 89-92 | grep -v 999 | awk '{ total += $1; count++ } END { print total/count }' > "${statistics_dir}/average.txt" &
33+
34+
wait
35+

0 commit comments

Comments
 (0)