Files
checkout/src/misc/licensed-download.sh
T

25 lines
663 B
Bash
Raw Normal View History

2021-10-19 14:30:04 -05:00
#!/bin/bash
set -e
2022-04-05 13:01:33 -04:00
if [ ! -f _temp/licensed-3.6.0.done ]; then
2021-10-19 14:30:04 -05:00
echo 'Clearing temp'
2022-04-05 13:01:33 -04:00
rm -rf _temp/licensed-3.6.0 || true
2021-10-19 14:30:04 -05:00
echo 'Downloading licensed'
2022-04-05 13:01:33 -04:00
mkdir -p _temp/licensed-3.6.0
pushd _temp/licensed-3.6.0
2021-10-19 14:30:04 -05:00
if [[ "$OSTYPE" == "darwin"* ]]; then
2022-04-05 13:01:33 -04:00
curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/3.6.0/licensed-3.6.0-darwin-x64.tar.gz
2021-10-19 14:30:04 -05:00
else
2022-04-05 13:01:33 -04:00
curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/3.6.0/licensed-3.6.0-linux-x64.tar.gz
2021-10-19 14:30:04 -05:00
fi
echo 'Extracting licenesed'
tar -xzf licensed.tar.gz
popd
2022-04-05 13:01:33 -04:00
touch _temp/licensed-3.6.0.done
2021-10-19 14:30:04 -05:00
else
echo 'Licensed already downloaded'
fi