diff --git a/autoupdate b/autoupdate index 35b36b6..1318b16 100755 --- a/autoupdate +++ b/autoupdate @@ -1,13 +1,11 @@ #!/usr/bin/env zsh set -e -alias db="dropbox_uploader" rm -r lib -db -q download py/lib >/dev/null +dropbox_uploader -q download py/lib >/dev/null if [ ! -d .git ]; then git -q init - [ -e version ] && rm version git add .gitignore '*' '**/*' else git add -A @@ -15,14 +13,8 @@ else [ "$changes" -eq 0 ] && exit 0 fi -if [ -s version ]; then - read -r version < version -else - version=0 -fi - +version="$(git log --oneline | wc -l)" let version++ || true # -e mode doesn't like this normally -echo $version > version git commit -qm "update $version" . >/dev/null