Fixes
This commit is contained in:
parent
e67c925593
commit
a47d635070
2 changed files with 31 additions and 31 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
OS_NAME=`cat /etc/os-release | grep "^NAME=" | sed 's/NAME=//g'`
|
OS_NAME=`cat /etc/os-release | grep "^NAME=" | sed 's/NAME=//g' | sed 's/"//g'`
|
||||||
OS_NAME=${OS_NAME^^} # UPPERCASE
|
OS_NAME=${OS_NAME^^} # UPPERCASE
|
||||||
|
|
||||||
case $OS_NAME in
|
case $OS_NAME in
|
||||||
|
|
|
@ -1,70 +1,70 @@
|
||||||
refresh_repo () {
|
refresh_repo () {
|
||||||
echo -n "Refreshing repo..."
|
echo "Refreshing repo..."
|
||||||
sudo apt update
|
sudo apt update
|
||||||
}
|
}
|
||||||
|
|
||||||
install_fish() {
|
install_fish() {
|
||||||
refresh_repo
|
refresh_repo
|
||||||
echo -n "Installing fish..."
|
echo "Installing fish..."
|
||||||
sudo apt install fish -y
|
sudo apt install fish -y
|
||||||
echo -n "Success"
|
echo "Success"
|
||||||
read -p "Install oh-my-zsh ? (y/n) [n]" ok
|
read -p "Install oh-my-fish ? (y/n) [n] " ok
|
||||||
case $ok in
|
case $ok in
|
||||||
[yY]*)
|
[yY]*)
|
||||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
curl -L https://get.oh-my.fish | fish
|
||||||
echo -n "Success"
|
echo "Success"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo -n "No modification"
|
echo "No modification"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
read -p "Set to default shell ? (y/n) [n]" ok
|
read -p "Set to default shell ? (y/n) [n] " ok
|
||||||
case $ok in
|
case $ok in
|
||||||
[yY]*)
|
[yY]*)
|
||||||
FISH_BIN=`which fish`
|
FISH_BIN=`which fish`
|
||||||
chsh -s "$FISH_BIN" "$USER"
|
chsh -s "$FISH_BIN" "$USER"
|
||||||
echo -n "Success"
|
echo "Success"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo -n "No modification"
|
echo "No modification"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
read -p "Install agnoster theme ? (y/n) [n]" ok
|
read -p "Install agnoster theme ? (y/n) [n] " ok
|
||||||
case $ok in
|
case $ok in
|
||||||
[yY]*)
|
[yY]*)
|
||||||
fish -c "omf install agnoster"
|
fish -c "omf install agnoster"
|
||||||
echo -n "Success"
|
echo "Success"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo -n "No modification"
|
echo "No modification"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
install_zsh() {
|
install_zsh() {
|
||||||
refresh_repo
|
refresh_repo
|
||||||
echo -n "Installing zsh..."
|
echo "Installing zsh..."
|
||||||
sudo apt install zsh -y
|
sudo apt install zsh -y
|
||||||
echo -n "Success"
|
echo "Success"
|
||||||
read -p "Install oh-my-zsh ? (y/n) [n]" ok
|
read -p "Install oh-my-zsh ? (y/n) [n] " ok
|
||||||
case $ok in
|
case $ok in
|
||||||
[yY]*)
|
[yY]*)
|
||||||
curl -L https://get.oh-my.fish | fish
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||||
echo -n "Success"
|
echo "Success"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo -n "No modification"
|
echo "No modification"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
read -p "Set to default shell ? (y/n) [n]" ok
|
read -p "Set to default shell ? (y/n) [n] " ok
|
||||||
case $ok in
|
case $ok in
|
||||||
[yY]*)
|
[yY]*)
|
||||||
ZSH_BIN=`which zsh`
|
ZSH_BIN=`which zsh`
|
||||||
chsh -s "$ZSH_BIN" "$USER"
|
chsh -s "$ZSH_BIN" "$USER"
|
||||||
echo -n "Success"
|
echo "Success"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo -n "No modification"
|
echo "No modification"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
@ -73,8 +73,8 @@ install_neovim () {
|
||||||
sudo add-apt-repository ppa:neovim-ppa/unstable -y
|
sudo add-apt-repository ppa:neovim-ppa/unstable -y
|
||||||
refresh_repo
|
refresh_repo
|
||||||
sudo apt-get install neovim -y
|
sudo apt-get install neovim -y
|
||||||
echo -n "Success"
|
echo "Success"
|
||||||
read -p "Install custom config (Warning : Erase old conf) ? (y/n) [n]" ok
|
read -p "Install custom config (Warning : Erase old conf) ? (y/n) [n] " ok
|
||||||
case $ok in
|
case $ok in
|
||||||
[yY]*)
|
[yY]*)
|
||||||
rm -rf ~/.config/nvim
|
rm -rf ~/.config/nvim
|
||||||
|
@ -84,14 +84,14 @@ install_neovim () {
|
||||||
sudo apt install ripgrep -y
|
sudo apt install ripgrep -y
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo -n "No modification"
|
echo "No modification"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
start () {
|
start () {
|
||||||
read -p "Select you shell. (0 - current, 1 - fish, 2 - zsh) [0]" shell
|
read -p "Select you shell. (0 - current, 1 - fish, 2 - zsh) [0] " shell
|
||||||
case $shell in
|
case $shell in
|
||||||
"1")
|
"1")
|
||||||
install_fish
|
install_fish
|
||||||
|
@ -100,16 +100,16 @@ start () {
|
||||||
install_zsh
|
install_zsh
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo -n "No modification"
|
echo "No modification"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
read -p "Install nvim 0.5 ? (y/n) [n]" ok
|
read -p "Install nvim 0.5 ? (y/n) [n] " ok
|
||||||
case $ok in
|
case $ok in
|
||||||
[yY]*)
|
[yY]*)
|
||||||
install_neovim
|
install_neovim
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo -n "No modification"
|
echo "No modification"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue