Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (18 sloc) 478 Bytes
source=$1
destination=$2
if [ -z $source || $destination ]; then
echo "This script must receive source($source) and destination($destination) to execute"
exit 1
fi
if ! which aws > /dev/null; then
sudo apt update
sudo apt install python3-pip
pip3 install awscli --upgrade --user
sudo ln -s ~/.local/bin/aws /usr/bin
fi
exclude=$3
if [ -z $exclude ]; then
aws s3 cp --recursive $source $destination
else
aws s3 cp --recursive $source $destination --exclude $exclude
fi
You can’t perform that action at this time.