0
1
Fork 0
mirror of https://github.com/actions/checkout synced 2024-06-26 15:58:20 +02:00
checkout/src/misc/licensed-download.sh

25 lines
663 B
Bash
Raw Normal View History

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