cargo-binstall/.github/scripts/pack-release-archives.sh
2022-09-10 23:59:41 +12:00

17 lines
317 B
Bash
Executable file

#!/bin/bash
set -euxo pipefail
for o in outputs/*; do
pushd "$o"
chmod +x cargo-binstall*
target=$(basename "$o" | cut -d. -f1)
if grep -qE '(apple|windows)' <<< "$target"; then
zip "../cargo-binstall-${target}.zip" *
else
tar cv * | gzip -9 > "../cargo-binstall-${target}.tgz"
fi
popd
done