Skip to content

Instantly share code, notes, and snippets.

@totomz
Created December 7, 2020 20:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save totomz/c888f60232dca6acc1fb2dd1c912d05f to your computer and use it in GitHub Desktop.
Save totomz/c888f60232dca6acc1fb2dd1c912d05f to your computer and use it in GitHub Desktop.
BAckup a project folder by archiving it and uploading to Dropbox
#!/bin/bash
FOLDER=$(pwd)/$1
INST=$(date "+%Y%m%d-%H%M%S")
echo "File description? Ctrl-C to abort"
read title
title="${title// /_}"
FILE="$1_${title}_${INST}"
tar -czvf ${FIlE}.tar.gz $(pwd)/$1
dropbox_uploader.sh upload $(pwd)/${FILE}.tar.gz /
rm ${FILE}.tar.gz
echo "ciao"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment