Created
May 24, 2019 18:41
-
-
Save raven-rock/b75aa2aee6974c661bce4e98dbcff5f8 to your computer and use it in GitHub Desktop.
Foundation of a simple, git-based, Dropbox-like tool
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
| #!/usr/bin/env bash | |
| changes=`git status --porcelain`; | |
| git pull | |
| if [[ -n $changes ]]; then | |
| echo "$changes" | |
| git add . && | |
| git commit -m "Automatic commit at `date`" -m "$changes" && | |
| git push | |
| else | |
| echo "No changes to push" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment