Update 'install.sh'

This commit is contained in:
2023-05-03 12:19:45 +02:00
parent 525d6c1a19
commit b406eb533f

View File

@@ -43,6 +43,20 @@ do
esac
done
while :
do
case "$1" in
update) update ;;
install) install; shift ;;
# -- means the end of the arguments; drop this, and break out of the while loop
--) shift; break ;;
# If invalid options were passed, then getopt should have reported an error,
# which we checked as VALID_ARGUMENTS when getopt was called...
*) echo "Unexpected option: $1 - this should not happen."
usage ;;
esac
done
echo "Parameters remaining are: $@"
@@ -312,68 +326,76 @@ function set_shell {
# --------------------------------------------------------------------------------------------------
init
# -----------------
# zsh
# -----------------
apt_install zsh
set_shell zsh
# --- TODO --- : Keyboard navigation, Suggestions, ...
function update {
cd "$(dirname "$0")"
wget -O- install.sh https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/install.sh
}
# -----------------
# General Config
# -----------------
init_install_rc "export KHOME=$HOME_PATH"
init_install_rc "export XDG_CONFIG_HOME=$CONFIG_PATH"
install_rc "shell" "https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/.general.rc"
function install {
init
# -----------------
# zsh
# -----------------
apt_install zsh
set_shell zsh
# --- TODO --- : Keyboard navigation, Suggestions, ...
# -----------------
# tmux
# -----------------
apt_install tmux
download_config tmux tmux.conf https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/.tmux.conf
download_config tmux tmux.theme https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/.tmux.theme
download_config tmux myip.sh https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/myip.sh
sudo chmod +x ${CONFIG_PATH}/tmux/myip.sh
install_rc tmux https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/.tmux.rc
git_clone "https://github.com/tmux-plugins/tpm" "${CONFIG_PATH}/tmux/plugins/tpm"
# -----------------
# unp
# -----------------
apt_install unp
# --- TODO --- : rc file
# -----------------
# bat
# -----------------
install_deb_github bat "sharkdp/bat" "bat_VERSION_ARCH.deb"
install_rc bat https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/.bat.rc
# -----------------
# Install lsd https://github.com/Peltoche/lsd
# -----------------
install_deb_github "lsd" "lsd-rs/lsd" "lsd_VERSION_ARCH.deb"
install_rc lsd https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/.lsd.rc
download_config lsd "config.yaml" "https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/.lsd.conf"
download_config lsd "themes/kamu.yaml" "https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/.lsd.theme"
#wget -O .zshrc https://git.grml.org/f/grml-etc-core/etc/zsh/zshrc
# -----------------
# Install OhMyPosh
# -----------------
download_config "omp" "omp.json" "https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/.omp.json"
install_rc "omp" "https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/.omp.rc"
install_binary_github "oh-my-posh" "JanDeDobbeleer/oh-my-posh" "posh-linux-ARCH"
# -----------------
# General Config
# -----------------
init_install_rc "export KHOME=$HOME_PATH"
init_install_rc "export XDG_CONFIG_HOME=$CONFIG_PATH"
install_rc "shell" "https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/.general.rc"
#git clone https://github.com/zsh-users/zsh-autosuggestions "$HOME/.config/zsh/zsh-autosuggestions"
# source ~/.config/zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
# -----------------
# tmux
# -----------------
apt_install tmux
download_config tmux tmux.conf https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/.tmux.conf
download_config tmux tmux.theme https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/.tmux.theme
download_config tmux myip.sh https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/myip.sh
sudo chmod +x ${CONFIG_PATH}/tmux/myip.sh
install_rc tmux https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/.tmux.rc
git_clone "https://github.com/tmux-plugins/tpm" "${CONFIG_PATH}/tmux/plugins/tpm"
cleanup
# -----------------
# unp
# -----------------
apt_install unp
# --- TODO --- : rc file
exit 0
# -----------------
# bat
# -----------------
install_deb_github bat "sharkdp/bat" "bat_VERSION_ARCH.deb"
install_rc bat https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/.bat.rc
# -----------------
# Install lsd https://github.com/Peltoche/lsd
# -----------------
install_deb_github "lsd" "lsd-rs/lsd" "lsd_VERSION_ARCH.deb"
install_rc lsd https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/.lsd.rc
download_config lsd "config.yaml" "https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/.lsd.conf"
download_config lsd "themes/kamu.yaml" "https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/.lsd.theme"
#wget -O .zshrc https://git.grml.org/f/grml-etc-core/etc/zsh/zshrc
# -----------------
# Install OhMyPosh
# -----------------
download_config "omp" "omp.json" "https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/.omp.json"
install_rc "omp" "https://git.cbeck.tech/kamu/dotfiles/raw/branch/main/.omp.rc"
install_binary_github "oh-my-posh" "JanDeDobbeleer/oh-my-posh" "posh-linux-ARCH"
#git clone https://github.com/zsh-users/zsh-autosuggestions "$HOME/.config/zsh/zsh-autosuggestions"
# source ~/.config/zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
cleanup
exit 0
}