Compare commits
6 Commits
master
...
e8cc922c61
Author | SHA1 | Date | |
---|---|---|---|
e8cc922c61 | |||
1740c9b5ee | |||
4d39769cac | |||
0cbb8a326d | |||
082355aee6 | |||
e047bc3109 |
@@ -42,10 +42,11 @@ zsh_prompt() {
|
|||||||
# run option
|
# run option
|
||||||
if [[ ${zshOption,,} = "y" ]]; then
|
if [[ ${zshOption,,} = "y" ]]; then
|
||||||
# Create temporary zsh file
|
# Create temporary zsh file
|
||||||
touch $homedir/.tempzshrc
|
touch ~/.tempzshrc
|
||||||
|
|
||||||
# set up the basics of zsh
|
# set up the basics of zsh
|
||||||
sh src/services/zsh/zsh.sh
|
sh src/services/zsh/zsh.sh
|
||||||
|
sh src/services/zsh/Oh-My-ZSH.sh
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -332,7 +333,7 @@ main() {
|
|||||||
cd src
|
cd src
|
||||||
rm temp/*
|
rm temp/*
|
||||||
|
|
||||||
install_oh_my_zsh
|
# install_oh_my_zsh
|
||||||
}
|
}
|
||||||
|
|
||||||
# PROGRAM BODY
|
# PROGRAM BODY
|
||||||
@@ -361,8 +362,6 @@ 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
|
||||||
|
@@ -5,12 +5,11 @@ wget https://go.dev/dl/
|
|||||||
latestversionsh="$(grep -w 'downloadBox' "index.html")"
|
latestversionsh="$(grep -w 'downloadBox' "index.html")"
|
||||||
latestversionsh=$(echo "$latestversionsh" | grep 'linux')
|
latestversionsh=$(echo "$latestversionsh" | grep 'linux')
|
||||||
|
|
||||||
a="$(grep -w 'data-linux="' "download")"
|
|
||||||
latestversionsh=${latestversionsh#*'href="'}
|
latestversionsh=${latestversionsh#*'href="'}
|
||||||
latestversionsh=${latestversionsh%'">'*}
|
latestversionsh=${latestversionsh%'">'*}
|
||||||
|
|
||||||
# Download latest golang version
|
# Download latest golang version
|
||||||
wget "https://go.dev"$latestversionsh
|
sudo -u $SUDO_USER wget "https://go.dev"$latestversionsh
|
||||||
|
|
||||||
# Remove any previous Go installation then extract the archive
|
# Remove any previous Go installation then extract the archive
|
||||||
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.19.1.linux-amd64.tar.gz
|
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.19.1.linux-amd64.tar.gz
|
||||||
|
@@ -3,16 +3,13 @@ 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")"' >> ~/.tempzshrc
|
echo 'export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"' >> ~/.zshrc
|
||||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.tempzshrc
|
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.zshrc
|
||||||
source ~/.tempzshrc
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# always put in bashrc aswell, so that the user can always rely on the standard shell
|
# 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
|
|
||||||
|
|
||||||
|
|
||||||
# install latest version of node
|
# install latest version of node
|
||||||
nvm install node
|
nvm install node
|
@@ -1,2 +1,8 @@
|
|||||||
# Get oh my zsh, after this command the install stios, since we switched shells
|
# Oh my zsh manual install
|
||||||
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" -y
|
git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh
|
||||||
|
|
||||||
|
# use the ohmyzsh template as zshrc
|
||||||
|
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
|
||||||
|
|
||||||
|
# set zsh as main terminal
|
||||||
|
chsh -s $(which zsh)
|
@@ -1,8 +1,3 @@
|
|||||||
# install ZSH
|
# install ZSH
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install zsh -y
|
sudo apt-get install zsh -y
|
||||||
|
|
||||||
# Set ZSH as standard interface
|
|
||||||
chsh -s $(which zsh)
|
|
||||||
|
|
||||||
source ~/.zshrc
|
|
Reference in New Issue
Block a user