Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Geoka1 committed Jan 11, 2025
1 parent 6b9f8e2 commit d734976
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
13 changes: 6 additions & 7 deletions infrastructure/systems/GNU-Parallel/aurpkg/scripts/pacaur.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,18 @@ pkgbuild="https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h"

run_tests() {
pkg="$1"
out_dir="$2"
mkcd "${OUT}/$pkg" || exit 1

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

curl --insecure -o PKGBUILD "$pkgbuild=$pkg" 2> /dev/null || echo ' '

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

# Read package names from the input file and process them in parallel
cat "$IN" | tr '\n' ' ' | parallel --jobs "$(nproc)" run_tests {} "$OUT"
parallel run_tests :::: "$IN"
16 changes: 8 additions & 8 deletions infrastructure/systems/Shark/max-temp/scripts/temp-analytics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
[[ -n "$input_file" ]] || { echo "script was not provided with \$input_file"; exit 1; }
[[ -n "$statistics_dir" ]] || { echo "script was not provided with \$statistics_dir"; exit 1; }

mkdir -p "$statistics_dir"

cut -c 89-92 "$input_file" |
grep -v 999 |
sort -n |
tee >(head -n1 > "${statistics_dir}/min.txt") \
>(tail -n1 > "${statistics_dir}/max.txt") |
awk '{ total += $1; count++ } END { print total/count }' > "${statistics_dir}/average.txt"
mkdir -p "${statistics_dir}"

tee < "${input_file}" | cut -c 89-92 | grep -v 999 | sort -rn | head -n1 > "${statistics_dir}/max.txt" &
tee < "${input_file}" | cut -c 89-92 | grep -v 999 | sort -n | head -n1 > "${statistics_dir}/min.txt" &
tee < "${input_file}" | cut -c 89-92 | grep -v 999 | awk '{ total += $1; count++ } END { print total/count }' > "${statistics_dir}/average.txt" &

wait

0 comments on commit d734976

Please sign in to comment.