#!/usr/bin/env zsh set -e [ -d lib ] && rm -r lib dropbox_uploader -q download py/lib >/dev/null cp lib/README.md . if [ ! -d .git ]; then git -q init git add .gitignore '*' '**/*' else git add -A changes="$(git status --porcelain | wc -l)" [ "$changes" -eq 0 ] && exit 0 fi version="$(git log --oneline | wc -l)" let version++ || true # -e mode doesn't like this normally git commit -qm "update $version" . >/dev/null if git remote | grep -Fxq origin; then git push -q origin master fi