From 12db642a5c6072750768011e034994bc9339aef9 Mon Sep 17 00:00:00 2001 From: Lord_Devi Date: Tue, 9 Jul 2024 01:01:59 -0400 Subject: [PATCH] Working. --- setup-dotz.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/setup-dotz.sh b/setup-dotz.sh index dda545b..4d63397 100755 --- a/setup-dotz.sh +++ b/setup-dotz.sh @@ -62,6 +62,7 @@ _install_ghq() { _mordu "Ghq already installed." else _mordu "Installing Ghq." + _mordu "GOPATH = ${GOPATH}" go install github.com/x-motemen/ghq@latest fi } @@ -99,6 +100,23 @@ _link_yadm_script() { } # }}} +# {{{ +_move_old_init_to_backup() { + _init_file=(\ + "${HOME}/.bash_history" \ + "${HOME}/.bash_logout " \ + "${HOME}/.bash_profile " \ + "${HOME}/.bashrc") + + for file in "${_init_file[@]}" ; do + if [ -e "$file" ]; then + _mordo "Found existing ${file}, moving to ${file}.bak." + mv "$file" "$file.bak" + fi + done +} +# }}} + # {{{ _clone_yadm_dotz() { local _repo="https://git.mgk.one/ld/dotz" @@ -131,6 +149,7 @@ _main() { _install_ghq #_clone_yadm #_link_yadm_script + #_move_old_init_to_backup #_clone_yadm_dotz #_install_x_if_asked "$@" #_yadm_bootstrap