checkout/src/misc/licensed-download.sh

25 lines
663 B
Bash
Raw Normal View History

2021-10-20 03:30:04 +08:00
#!/bin/bash
set -e
if [ ! -f _temp/licensed-3.6.0.done ]; then
2021-10-20 03:30:04 +08:00
echo 'Clearing temp'
rm -rf _temp/licensed-3.6.0 || true
2021-10-20 03:30:04 +08:00
echo 'Downloading licensed'
mkdir -p _temp/licensed-3.6.0
pushd _temp/licensed-3.6.0
2021-10-20 03:30:04 +08:00
if [[ "$OSTYPE" == "darwin"* ]]; then
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-20 03:30:04 +08:00
else
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-20 03:30:04 +08:00
fi
echo 'Extracting licenesed'
tar -xzf licensed.tar.gz
popd
touch _temp/licensed-3.6.0.done
2021-10-20 03:30:04 +08:00
else
echo 'Licensed already downloaded'
fi