Skip to content

Commit

Permalink
Update srcinfo.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
oklopfer authored May 4, 2024
1 parent ef96250 commit 00e8e05
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions srcinfo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ write_all() {
local packagelist
mapfile -t packagelist < packagelist
export -f srcinfo
printf "%s\n" "${packagelist[@]}" | xargs -I {} -P "$(nproc)" bash -c 'srcinfo "packages/{}/{}.pacscript" "${parsed_distros[@]}" | tee "packages/{}/.SRCINFO" > /dev/null'
printf "%s\n" "${packagelist[@]}" | xargs -I {} -P "$(nproc)" bash -c 'IFS=" " read -r -a parsed_distros <<< "$parsed_distros_str"; srcinfo "packages/{}/{}.pacscript" "${parsed_distros[@]}" | tee "packages/{}/.SRCINFO" > /dev/null'
}

fetch_distros() {
Expand All @@ -86,6 +86,7 @@ fetch_distros() {
}
END {print "devel"}
')
export parsed_distros_str="${parsed_distros[*]}"
}

(($# <= 0)) && echo "You failed to specify a pacscript." && exit 1
Expand All @@ -96,6 +97,6 @@ case ${1} in
*.pacscript) srcinfo "${1}" "${parsed_distros[@]}" ;;
*) echo "Please specify a pacscript or use write_all." && exit 1 ;;
esac
unset parsed_distros
unset parsed_distros parsed_distros_str

# vim:set ft=sh ts=2 sw=4 noet:

0 comments on commit 00e8e05

Please sign in to comment.