Skip to content

Instantly share code, notes, and snippets.

@raven-rock
Created May 24, 2019 18:41
Show Gist options
  • Select an option

  • Save raven-rock/b75aa2aee6974c661bce4e98dbcff5f8 to your computer and use it in GitHub Desktop.

Select an option

Save raven-rock/b75aa2aee6974c661bce4e98dbcff5f8 to your computer and use it in GitHub Desktop.
Foundation of a simple, git-based, Dropbox-like tool
#!/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