i shouldve created a branch
This commit is contained in:
parent
f2c024cd51
commit
3dc64233d5
22
install.sh
22
install.sh
@ -40,10 +40,12 @@ zsh_prompt() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# run option
|
# run option
|
||||||
if [[ ${zshOption,,} = "n" ]]; then
|
if [[ ${zshOption,,} = "y" ]]; then
|
||||||
return
|
# Create temporary zsh file
|
||||||
elif [[ ${zshOption,,} = "y" ]]; then
|
touch $homedir/.tempzshrc
|
||||||
sh src/Oh-My-ZSH.sh
|
|
||||||
|
# set up the basics of zsh
|
||||||
|
sh src/services/zsh/zsh.sh
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -288,6 +290,14 @@ check_sudo_arguments() {
|
|||||||
main
|
main
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install_oh_my_zsh() {
|
||||||
|
# run option
|
||||||
|
if [[ ${zshOption,,} = "y" ]]; then
|
||||||
|
# Run Ohmyzsh (ends script)
|
||||||
|
sh services/zsh/Oh-My-ZSH.sh
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
# check if the computer has a stable connections
|
# check if the computer has a stable connections
|
||||||
source ./src/services/connection.sh
|
source ./src/services/connection.sh
|
||||||
@ -321,6 +331,8 @@ main() {
|
|||||||
cd $dir
|
cd $dir
|
||||||
cd src
|
cd src
|
||||||
rm temp/*
|
rm temp/*
|
||||||
|
|
||||||
|
install_oh_my_zsh
|
||||||
}
|
}
|
||||||
|
|
||||||
# PROGRAM BODY
|
# PROGRAM BODY
|
||||||
@ -349,6 +361,8 @@ homedir="$(getent passwd $SUDO_USER | cut -d: -f6)"
|
|||||||
debug=false
|
debug=false
|
||||||
downloadall=false
|
downloadall=false
|
||||||
usezsh=""
|
usezsh=""
|
||||||
|
echo $homedir
|
||||||
|
sleep 10
|
||||||
|
|
||||||
# run the program
|
# run the program
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
# install ZSH
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install zsh -y
|
|
||||||
|
|
||||||
# Set ZSH as standard interface
|
|
||||||
chsh -s $(which zsh)
|
|
||||||
|
|
||||||
|
|
||||||
bash -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
|
|
||||||
# Get oh my zsh
|
|
||||||
# sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" -y
|
|
||||||
|
|
||||||
# recompile zsh
|
|
||||||
source ~/.zshrc
|
|
@ -6,14 +6,15 @@ sudo tar -xvf linux64 -C /usr/bin
|
|||||||
|
|
||||||
# export postman to env table
|
# export postman to env table
|
||||||
if [[ $(which zsh) == "/usr/bin/zsh" ]]; then
|
if [[ $(which zsh) == "/usr/bin/zsh" ]]; then
|
||||||
echo '# Postman path' >> ~/.zshrc
|
echo '# Postman path' >> ~/.tempzshrc
|
||||||
echo 'export PATH="$PATH:/usr/bin/Postman"' >> ~/.zshrc
|
echo 'export PATH="$PATH:/usr/bin/Postman"' >> ~/.tempzshrc
|
||||||
source ~/.zshrc
|
source ~/.tempzshrc
|
||||||
else
|
fi
|
||||||
|
|
||||||
|
# always put in bashrc aswell, so that the user can always rely on the standard shell
|
||||||
echo '# Postman path' >> ~/.bashrc
|
echo '# Postman path' >> ~/.bashrc
|
||||||
echo 'export PATH="$PATH:/usr/bin/Postman"' >> ~/.bashrc
|
echo 'export PATH="$PATH:/usr/bin/Postman"' >> ~/.bashrc
|
||||||
source ~/.bashrc
|
source ~/.bashrc
|
||||||
fi
|
|
||||||
|
|
||||||
# Create file and set info
|
# Create file and set info
|
||||||
touch Postman.desktop
|
touch Postman.desktop
|
||||||
|
@ -3,14 +3,16 @@ wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
|
|||||||
|
|
||||||
# export nvm to env table
|
# export nvm to env table
|
||||||
if [[ $(which zsh) == "/usr/bin/zsh" ]]; then
|
if [[ $(which zsh) == "/usr/bin/zsh" ]]; then
|
||||||
echo 'export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"' >> ~/.zshrc
|
echo 'export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"' >> ~/.tempzshrc
|
||||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.zshrc
|
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.tempzshrc
|
||||||
source ~/.zshrc
|
source ~/.tempzshrc
|
||||||
else
|
fi
|
||||||
|
|
||||||
|
# always put in bashrc aswell, so that the user can always rely on the standard shell
|
||||||
echo 'export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"' >> ~/.bashrc
|
echo 'export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"' >> ~/.bashrc
|
||||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc
|
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc
|
||||||
source ~/.bashrc
|
source ~/.bashrc
|
||||||
fi
|
|
||||||
|
|
||||||
# install latest version of node
|
# install latest version of node
|
||||||
nvm install node
|
nvm install node
|
2
src/services/zsh/Oh-My-ZSH.sh
Normal file
2
src/services/zsh/Oh-My-ZSH.sh
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Get oh my zsh, after this command the install stios, since we switched shells
|
||||||
|
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" -y
|
8
src/services/zsh/zsh.sh
Normal file
8
src/services/zsh/zsh.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# install ZSH
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install zsh -y
|
||||||
|
|
||||||
|
# Set ZSH as standard interface
|
||||||
|
chsh -s $(which zsh)
|
||||||
|
|
||||||
|
source ~/.zshrc
|
Loading…
x
Reference in New Issue
Block a user