allegro/scripts/setup-fedran-covers.sh

26 lines
931 B
Bash
Executable file

#!/usr/bin/env bash
# Download the Fedran covers for inclusion. This places everything into the
# ./build/fedran-covers folder.
# Move into the root folder.
cd $(dirname $(dirname $0))
# Check to see if it is already downloaded.
if [ -d ./build/fedran-covers ]
then
echo "$(basename $0): fedran-covers already exists, not downloading"
else
# Make sure we have all the required environment variables.
echo "$(basename $0): fedran-covers is missing, download from bucket"
./scripts/check-env-bucket.sh || exit 1
# Download and extract the bucket.
mkdir -p ./build/fedran-covers
s3cmd --access_key=$AWS_ACCESS_KEY_ID --access_token=$AWS_SECRET_ACCESS_KEY --host=$AWS_ENDPOINT --host-bucket=$AWS_ENDPOINT -P get s3://$AWS_BUCKET/fedran-covers.tar.bz2 ./build/fedran-covers/fedran-covers.tar.bz2
tar x -C build/fedran-covers -f build/fedran-covers/fedran-covers.tar.bz2
fi
# Versions
# 2022-08-11 - Initial version