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