install.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/usr/bin/zsh
  2. echo -n "[*] Do you want to install all packages via pacman? [y/n] "
  3. read yesno
  4. if [[ "$yesno" == "y" ]]; then
  5. echo "[*] Installing most popular tools"
  6. # most important tools that are _always_ needed
  7. sudo pacman -Sy fzf fd neovim ripgrep nmap hexyl ctags git podman ueberzug duf exa i3blocks
  8. fi
  9. # .zpretzo
  10. echo -n "[*] Do you want to install zpretzo? [y/n] "
  11. read yesno
  12. if [[ "$yesno" == "y" ]]; then
  13. cd $HOME
  14. [ ! -d "$HOME/.zprezto" ] && git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
  15. setopt EXTENDED_GLOB
  16. for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
  17. rm -rf "${ZDOTDIR:-$HOME}/.${rcfile:t}"
  18. echo "[*] Symlinking $rcfile -> ${ZDOTDIR:-$HOME}/.${rcfile:t}"
  19. ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
  20. done
  21. fi
  22. echo -n "[*] Copy (and overwrite) dotfiles? [y/n] "
  23. read yesno
  24. if [[ $yesno -eq "y" ]]; then
  25. backup_dir=/tmp/dotfiles-backup-$(date "+%H%M%S")
  26. rsync --backup --backup-dir $backup_dir --exclude .git/ --exclude install.sh -r . $HOME
  27. echo "[+] Dotfiles installed :) Backup available @ $backup_dir"
  28. fi