From d726a6812c13b9abdeaa793fd9f0eb149d12866a Mon Sep 17 00:00:00 2001 From: steveokard Date: Mon, 28 Dec 2020 05:41:24 -0500 Subject: [PATCH] script cleanup --- fish.sh | 8 +++++++- init.sh | 31 +++++++++++++++++-------------- prezto.zsh | 13 +++---------- scripts/fixNXDomain.zsh | 0 4 files changed, 27 insertions(+), 25 deletions(-) mode change 100644 => 100755 scripts/fixNXDomain.zsh diff --git a/fish.sh b/fish.sh index a16e48a..4cd82fb 100755 --- a/fish.sh +++ b/fish.sh @@ -1,7 +1,13 @@ #!/bin/bash #installs and sets up oh-my-fish sudo apt install git fish -curl -L https://get.oh-my.fish | fish + +#Set up configuration ln -s "$HOME/stevset/fish/omf" "$HOME/.config/" + +#download script +curl -L https://get.oh-my.fish | fish + +#setup theme omf install bobthefish diff --git a/init.sh b/init.sh index ba387c9..876ed2c 100755 --- a/init.sh +++ b/init.sh @@ -1,6 +1,6 @@ #!/bin/bash #install pre-req. -echo -n "Which Linux flavor will we be installing programs for? (u/o)"; read answer +echo -n "Which Linux flavor will we be installing programs for? (u/o)"; read -r answer if [[ $answer = "U" ]] || [[ $answer = "u" ]]; then bash udeps.sh elif [[ $answer = "O" ]] || [[ $answer = "o" ]]; then @@ -11,7 +11,7 @@ else fi #setup prezto -echo "Select which shell to configure and use:"; read answer +echo "Select which shell to configure and use: zsh/fish/bash"; read -r answer if [[ $answer = "zsh" ]] || [[ $answer = "z" ]]; then echo "Initializing Prezto" zsh prezto.zsh @@ -35,27 +35,30 @@ chmod 0700 ~/.ssh chmod -R 0600 ~/.ssh/* #cp "$HOME/stevset/mc" "$HOME/.config/mc" +#Configure git user +echo -n "Would you like to configure your git name and email? (y/n) => "; read -r answer +if [[ $answer = "Y" ]] || [[ $answer = "y" ]]; then + echo -n "What is your git user name => "; read -r name + git config --global user.name "$name" + echo -n "What is your git email => "; read -r email + git config --global user.email "$email" +fi + #install spacevim -echo "Installing Space VIM!" if [ ! -e ~/.space-vim ] then mv "$HOME/.vim" "$HOME/vim_bk" mv "$HOME/.vimrc" "$HOME/vimrc_bk" - (curl -sLf https://spacevim.org/install.sh | bash) -fi - -echo -n "Would you like to configure your git name and email? (y/n) => "; read answer -if [[ $answer = "Y" ]] || [[ $answer = "y" ]]; then - echo -n "What is your git user name => "; read name - git config --global user.name "$name" - echo -n "What is your git email => "; read email - git config --global user.email "$email" + echo "Install SpaceVim now? y/n"; read -r answer + if [[ $answer = "Y" ]] || [[ $answer = "y" ]]; then + (curl -sLf https://spacevim.org/install.sh | bash) + fi fi #install Emacs Doom -echo "Install Emacs Doom now? y/n"; read answer +echo "Install Emacs Doom now? y/n"; read -r answer if [[ $answer = "Y" ]] || [[ $answer = "y" ]]; then - zsh emacs_doom.zsh + ./emacs_doom.sh fi echo "*******************************" diff --git a/prezto.zsh b/prezto.zsh index e682890..45c332f 100755 --- a/prezto.zsh +++ b/prezto.zsh @@ -1,7 +1,7 @@ #!/bin/zsh #Initializes Prezto -echo "initialize submodules and clone prezto" git clone --recursive -j 4 https://github.com/steveokard/prezto.git "$HOME/stevset/prezto/.zprezto" + #Remove old stuff echo "....Creating symlinks" rm -rf ~/.zshrc ~/.zsh ~/.zprofile ~/.zlogin ~/.zlogout ~/.zpreztorc ~/.zshenv @@ -12,17 +12,10 @@ for rcfile in "${ZDOTDIR:-$HOME}"/stevset/prezto/.zprezto/runcoms/^README.md(.N) ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}" done -#Fix History if it exists -if test -f "~/.zsh_history"; then - cat ~/.zsh_history > ~/.zhistory -fi - -#extra setup for powerlevel10k theme +#setup theme echo "remember to run p10k configure to configure the theme!" -#ln -s $HOME/stevset/.p10k.zsh $HOME/ - -rm $HOME/.zprezto/modules/prompt/functions/prompt_powerlevel10k_setup ln -s $HOME/.zprezto/modules/prompt/external/powerlevel10k/prompt_powerlevel10k_setup $HOME/.zprezto/modules/prompt/functions/prompt_powerlevel10k_setup #finally, fix permissions to avoid compaudit flag chmod -R go-w ~/.zprezto + diff --git a/scripts/fixNXDomain.zsh b/scripts/fixNXDomain.zsh old mode 100644 new mode 100755