diff options
Diffstat (limited to 'modules/buildsystem/templates/binrepo/upload-bin')
| -rwxr-xr-x | modules/buildsystem/templates/binrepo/upload-bin | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/buildsystem/templates/binrepo/upload-bin b/modules/buildsystem/templates/binrepo/upload-bin index c67f045a..7cad5838 100755 --- a/modules/buildsystem/templates/binrepo/upload-bin +++ b/modules/buildsystem/templates/binrepo/upload-bin @@ -1,9 +1,11 @@ #!/bin/sh -binrepodir=<%= repodir %> -uploadinfosdir=<%= uploadinfosdir %> +set -e + +binrepodir=<%= scope.lookupvar('buildsystem::var::binrepo::repodir') %> +uploadinfosdir=<%= scope.lookupvar('buildsystem::var::binrepo::uploadinfosdir') %> tmpfile=$(mktemp) -mail_from="<%= uploadmail_from %>" -mail_dest="<%= uploadmail_to %>" +mail_from="<%= scope.lookupvar('buildsystem::var::binrepo::uploadmail_from') %>" +mail_dest="<%= scope.lookupvar('buildsystem::var::binrepo::uploadmail_to') %>" test $# = 2 || exit 3 username="$1" @@ -11,6 +13,7 @@ comment="$2" /bin/cat > "$tmpfile" sha1sum=$(/usr/bin/sha1sum "$tmpfile" | sed 's/ .*$//') +test -n "$sha1sum" if [ -f "$binrepodir/$sha1sum" ] then echo "File $sha1sum already exists." >&2 |
