2016-07-14 20:47:38 +03:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if ! test -d "$1"; then
|
|
|
|
echo "Usage: upload-tooltool.sh <destination directory>"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2016-08-25 22:56:03 +03:00
|
|
|
export tooltool=$(realpath "$(dirname $0)/tooltool.py")
|
|
|
|
upload_one() {
|
|
|
|
cd $1
|
2016-07-25 13:48:01 +03:00
|
|
|
chmod -x sccache2.tar.*
|
2016-07-14 20:47:38 +03:00
|
|
|
rm -f releng.manifest
|
2016-07-26 15:55:22 +03:00
|
|
|
python "$tooltool" add -v --visibility=public --unpack -m releng.manifest sccache2.tar.*
|
2016-07-14 20:47:38 +03:00
|
|
|
python "$tooltool" upload -v -m releng.manifest --message "Build of sccache2 from revision $(cat REV)" --authentication-file ~/tooltool-upload-token
|
2016-08-25 22:56:03 +03:00
|
|
|
}
|
|
|
|
export -f upload_one
|
|
|
|
|
|
|
|
dirs="$1"/*
|
|
|
|
if which parallel >/dev/null; then
|
|
|
|
parallel --linebuffer upload_one ::: ${dirs}
|
|
|
|
else
|
|
|
|
for d in ${dirs}; do
|
|
|
|
upload_one $d
|
|
|
|
done
|
|
|
|
fi
|