dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit ba106d83cc21622df3d3cfd14b2ed9bcf9f95ccd
parent 7efc11f8530d109190f508d0ac6b969e0faa4c3a
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Sun,  9 Jun 2019 15:42:53 -0400

my: Don't ever auto-pull dotfiles repo

Diffstat:
M.local/bin/my | 26++++++++++++--------------
1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/.local/bin/my b/.local/bin/my @@ -2,6 +2,7 @@ # # ~/.local/bin/my # +# vim: set sts=4 sw=4 et: # Command and handlers for them are added as-needed. Some commands only # have one handler, but exist to avoid re-writes across my dotfiles @@ -341,21 +342,18 @@ case $command in find . -maxdepth 1 -name ._.djmoch -mtime +8 -exec echo "Dotfiles more than one week old" \; ;; update) - if type sha256sum > /dev/null 2>&1 - then - sha_exec=sha256sum - fieldnum=1 - else - sha_exec=sha256 - fieldnum=4 - fi - if [ -d "$HOME/.dotfiles" ] - then - cd "$HOME/.dotfiles" - status=`git fetch --dry-run` - [ ! "$status" = "" ] && git pull --no-commit > /dev/null 2>&1 - elif [ -d "$HOME/.dotfiles_tgz" ] + if [ -d "$HOME/.dotfiles_tgz" ] then + + if type sha256sum > /dev/null 2>&1 + then + sha_exec=sha256sum + fieldnum=1 + else + sha_exec=sha256 + fieldnum=4 + fi + curl -s https://git.danielmoch.com/dotfiles/snapshot/dotfiles-master.tar.gz > /tmp/dotfiles.tgz.$$ oldsum=`$sha_exec "$HOME/.dotfiles_tgz/dotfiles.tar.gz" | cut -d ' ' -f $fieldnum` newsum=`$sha_exec "/tmp/dotfiles.tgz.$$" | cut -d ' ' -f $fieldnum`