Commit 96d7a50d authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Make do_upgrade work without prompting or timestamping

When run from the command line, do_upgrade will not check timestamps or
prompt the user to continue.
parent af8d6050
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ fi

. ~/.shell/funcs

do_update
USE_PROMPT=yes do_update

# Source global definitions
# (debian global bashrc has a bad habit of setting PS1, so revert after)
+14 −12
Original line number Diff line number Diff line
@@ -138,6 +138,7 @@ do_update()
	local BOLD_BLUE=$'\033[34;1m' DEFAULT=$'\033[m'
	local prompt="${BOLD_BLUE}Would you like to update dotfiles?${DEFAULT} "

	if [ -n "$USE_PROMPT" ]; then
		if [ $now -lt $((updated + 604800)) ]; then
			return
		fi
@@ -151,6 +152,7 @@ do_update()
			[Nn]|[Nn][Oo]) touch "$timestamp"; return ;;
			*) return ;;
		esac
	fi

	(cd ~
		update_worktree &&
+1 −1
Original line number Diff line number Diff line
source ~/.shell/funcs

do_update
USE_PROMPT=yes do_update

plugins+=(git django pip python)
plugins+=(virtualenv-auto)