index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2017-05-17 11:21:57 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-05-17 11:21:57 +0200 |
commit | ca36b4abdb65eddcc6facca5da2d6fc4b33348ab (patch) | |
tree | a5a80271e95671d34eb169fa89c5eebea96da0b3 /bin/return-assignment | |
parent | 41df00bbbc035c4900702488d3875159e23ce49c (diff) |
-rwxr-xr-x | bin/return-assignment | 13 |
diff --git a/bin/return-assignment b/bin/return-assignment index 7893c14..3468f49 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -7,6 +7,11 @@ # or on failure via: # "$0 $package $revision $mod_revision $repository ERROR" +# exit codes: +# 0: ok +# 1: outdated package +# 2: signature error + # TODO: # use lock file(s) # remove old version(s) of newly compiled packages @@ -66,22 +71,22 @@ signature_errors="$( sed 's|\.sig$||' | \ sort | \ uniq -c | \ - grep '^\s*2\s' | \ + grep -v '^\s*2\s' | \ awk '{print $2}' )" if [ -n "${signature_errors}" ]; then >&2 echo 'The following packages lack a signature or vice versa:' >&2 echo "${signature_errors}" - exit 1 + exit 2 fi # move packages packages=(*.pkg.tar.xz) mkdir -p "${master_mirror_directory}/i486/$4-staging/" -mv "*.pkg.tar.xz{,.sig}" "${master_mirror_directory}/i486/$4-staging/" +mv *.pkg.tar.xz{,.sig} "${master_mirror_directory}/i486/$4-staging/" -pushd "${master_mirror_directory}/i486" > /dev/null +pushd "${master_mirror_directory}/i486/$4-staging" > /dev/null repo-add -v -s -k "${repo_key}" "$4-staging.db.tar.gz" "${packages[@]}" popd > /dev/null |