Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. #!/bin/sh
  2. if [ $1 == "help" ];
  3. then
  4. echo "First argument: Path of file on Remote host. \nSecond argument: Path of directory on Local host.\nThird argument: OS type.
  5. Forth argument: configure aws boolean values true/false.\nFifth argument: S3Uri."
  6. else
  7. scp -rv $6:$1 $2
  8. if [ $3 == "mac" ]; then
  9. brew install awscli
  10. else
  11. apt-get install -y awscli
  12. fi
  13. if [ $4 ]; then
  14. aws configure
  15. fi
  16. aws s3 cp $2 s3://$5 --recursive
  17. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement