alfresco-content-app/scripts/ci/utils/artifact-from-s3.sh
Maurizio Vitale 762c7f8974
Fix the scss import and save the build on S3 (#1382)
* Fix the scss import and save the build on S3

* Run unit test without builing again

* Move success after build

* Build with config e2e
2020-03-27 11:55:04 +00:00

29 lines
691 B
Bash
Executable File

#!/usr/bin/env bash
show_help() {
echo "Usage: artifact-from-s3.sh <options>"
echo ""
echo "-a or --artifact [mandatory]: path to the s3 artifact (tar.bz2) to download and extract"
echo "-o or --output [mandatory]: directory to extract the archive to"
}
while [[ $1 == -* ]]; do
case "$1" in
-h|--help|-\?) show_help; exit 0;;
-a|--artifact) ARTIFACT=$2; shift 2;;
-o|--output) OUTPUT=$2; shift 2;;
-*) shift;;
esac
done
if [ "${ARTIFACT}" == "" ] || [ "${OUTPUT}" == "" ]
then
show_help;
exit 1
fi
test ! -d $OUTPUT && mkdir -p $OUTPUT
aws s3 cp $ARTIFACT ./s3-artifact.tmp
tar -xvf ./s3-artifact.tmp -C $OUTPUT
rm ./s3-artifact.tmp