Move all getdot logic back into .zshrc
This commit is contained in:
parent
09476d019f
commit
828a93e54c
|
@ -286,6 +286,10 @@ function scpace {
|
|||
scp -P 11275 $@
|
||||
}
|
||||
|
||||
alias grh="git reset --hard"
|
||||
alias grhp="git reset --hard && git pull"
|
||||
alias dropall="while git stash drop; do :; done"
|
||||
|
||||
function gamp {
|
||||
git add * && git commit -am "$1" && git push
|
||||
}
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
logfile="$HOME/.tmp/getdot-log"
|
||||
# date >> "$logfile"
|
||||
# echo "~/zlogin, babyyy" >> "$logfile"
|
||||
|
||||
LOGIN_SYNC_DATE="$HOME/.bin/.login-dot-sync"
|
||||
|
||||
touch $LOGIN_SYNC_DATE
|
||||
login_sync_date="$(date '+%D')"
|
||||
logged_date="$(cat "$LOGIN_SYNC_DATE")"
|
||||
|
||||
if [[ "$login_sync_date" == "$logged_date" ]]; then
|
||||
GETDOT_ARGS="--skip-dconf" source "$HOME/.zshrc"
|
||||
else
|
||||
RUN_GETDOT="true" GETDOT_ARGS="--skip-dconf" source "$HOME/.zshrc"
|
||||
fi
|
||||
|
||||
echo "$login_sync_date" > "$LOGIN_SYNC_DATE"
|
|
@ -330,6 +330,17 @@ fi
|
|||
|
||||
last_get_file="$HOME/.tmp/.$(whoami)-dotfiles-last-get"
|
||||
current_date="$(date '+%Y-%m-%d')"
|
||||
LOGIN_SYNC_DATE="$HOME/.bin/.login-dot-sync"
|
||||
|
||||
touch $LOGIN_SYNC_DATE
|
||||
login_sync_date="$(date '+%D')"
|
||||
logged_date="$(cat "$LOGIN_SYNC_DATE")"
|
||||
|
||||
if [[ "$login_sync_date" == "$logged_date" ]]; then
|
||||
GETDOT_ARGS="--skip-dconf" source "$HOME/.zshrc"
|
||||
else
|
||||
RUN_GETDOT="true" GETDOT_ARGS="--skip-dconf" source "$HOME/.zshrc"
|
||||
fi
|
||||
if [[ "$RUN_GETDOT" == "true" ]] || (test -d "$DOT_DIR" && [[ "$current_date" != "$(cat "$last_get_file")" ]] &> /dev/null); then
|
||||
echo "$current_date" > "$last_get_file"
|
||||
date >> "$HOME/.tmp/getdot-log"
|
||||
|
|
Loading…
Reference in New Issue