Created
May 16, 2018 12:11
-
-
Save cdechery/50f4162601a4ea1bd0789d4740b5e476 to your computer and use it in GitHub Desktop.
Edit text files on S3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
FILE=$(basename $1) | |
aws s3 cp "s3:/"$1 . | |
nano $FILE | |
read -p "Atualizar no S3? [s/n] " -n 1 -r | |
echo "" | |
if [[ $REPLY =~ ^[Ss]$ ]] | |
then | |
echo "Enviando arquivo para o S3..." | |
aws s3 cp $FILE "s3:/"$1 | |
else | |
echo "Abortando!" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment