cleanup
This commit is contained in:
parent
dc33dd084f
commit
316a50d8fa
|
@ -4,7 +4,7 @@ co $XDG_DOCUMENTS_DIR/dev
|
|||
dk $XDG_DESKTOP_DIR
|
||||
dl $XDG_DOWNLOAD_DIR
|
||||
dm $XDG_DOCUMENTS_DIR
|
||||
ds $XDG_DATA_HOME/dots
|
||||
ds $STOW_DIR/$DOTS_PACKAGE
|
||||
dt $XDG_DATA_HOME
|
||||
e /etc
|
||||
h $HOME
|
||||
|
|
|
@ -5,7 +5,7 @@ map gco cd ~/Documents/dev
|
|||
map gdk cd ~/Desktop
|
||||
map gdl cd ~/Downloads
|
||||
map gdm cd ~/Documents
|
||||
map gds cd ~/.local/share/dots
|
||||
map gds cd ~/.local/share/stow/dots
|
||||
map gdt cd ~/.local/share
|
||||
map ge cd /etc
|
||||
map gh cd ~
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../../../Documents/dev/tralios/tralios-kube/_kube
|
|
@ -5,7 +5,7 @@ hash -d co=~/Documents/dev
|
|||
hash -d dk=~/Desktop
|
||||
hash -d dl=~/Downloads
|
||||
hash -d dm=~/Documents
|
||||
hash -d ds=~/.local/share/dots
|
||||
hash -d ds=~/.local/share/stow/dots
|
||||
hash -d dt=~/.local/share
|
||||
hash -d e=/etc
|
||||
hash -d h=~
|
||||
|
|
|
@ -1 +1,4 @@
|
|||
.config/zsh/.zcompdump
|
||||
.config/zsh/completions/_kube
|
||||
.config/zsh/configs/host-setup
|
||||
.local/share/service
|
||||
|
|
|
@ -7,7 +7,7 @@ BLUE="$(tput setaf 4)"
|
|||
NC="$(tput sgr0)"
|
||||
|
||||
dgit() {
|
||||
git -C "$STOW_DIR/$DOTS_PACKAGE" "$@"
|
||||
git -C "$STOW_DIR/$DOTS_PACKAGE" "$@"
|
||||
}
|
||||
|
||||
printf "%b" "${BOLD}${BLUE}Removing dotfile symlinks...$NC\n\n"
|
||||
|
@ -17,7 +17,7 @@ printf "%b" "${BOLD}${BLUE}Stashing existing changes...$NC\n"
|
|||
stash_result=$(dgit stash push)
|
||||
needs_pop=1
|
||||
if [ "$stash_result" = "No local changes to save" ]; then
|
||||
needs_pop=0
|
||||
needs_pop=0
|
||||
fi
|
||||
printf "\n"
|
||||
|
||||
|
@ -28,17 +28,17 @@ dgit submodule update --remote --merge
|
|||
printf "\n"
|
||||
|
||||
if [ $needs_pop -eq 1 ]; then
|
||||
printf "%b" "${BOLD}${BLUE}Popping stashed changes...$NC\n"
|
||||
dgit stash pop
|
||||
printf "%b" "${BOLD}${BLUE}Popping stashed changes...$NC\n"
|
||||
dgit stash pop
|
||||
fi
|
||||
printf "\n"
|
||||
|
||||
unmerged_files=$(dgit diff --name-only --diff-filter=U)
|
||||
if [ -n "$unmerged_files" ]; then
|
||||
printf "%b" "${RED}The following files have merge conflicts after popping the stash:$NC\n\n"
|
||||
printf "%s" "$unmerged_files\n\n"
|
||||
printf "%s" "${BOLD}${BLUE}Reverting to previous commit...$NC"
|
||||
dgit checkout "$old_commit"
|
||||
printf "%b" "${RED}The following files have merge conflicts after popping the stash:$NC\n\n"
|
||||
printf "%s" "$unmerged_files\n\n"
|
||||
printf "%s" "${BOLD}${BLUE}Reverting to previous commit...$NC"
|
||||
dgit checkout "$old_commit"
|
||||
fi
|
||||
|
||||
printf "%b" "${BOLD}${BLUE}Symlinking dotfiles...$NC\n\n"
|
||||
|
|
Loading…
Reference in New Issue