my dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

56 lines
1.0 KiB

  1. #!/usr/bin/env bash
  2. # intended to be run from termux
  3. # curl -sSL "https://raw.githubusercontent.com/sentriz/dotfiles/master/install_phone_all" | sh -s - path/to/key
  4. set -e
  5. if test "$#" -ne 1; then
  6. echo "please provide a private key" >&2
  7. exit 1
  8. fi
  9. conf_dots_dir="$HOME/projects/dotfiles"
  10. conf_priv_key="$1"
  11. mkdir -p "$HOME/projects/dotfiles/" >/dev/null 2>&1
  12. function once() {
  13. flag="$HOME/.cache/dot_once_$1"
  14. test ! -f "$flag" && "$1" && touch "$1"
  15. }
  16. function setup-pacs() {
  17. apt update
  18. apt upgrade
  19. apt install \
  20. fish \
  21. git \
  22. gnupg \
  23. neovim \
  24. openssh \
  25. python \
  26. stow \
  27. wget
  28. }
  29. function setup-priv-key() {
  30. gpg --import "$conf_priv_key"
  31. rm "$conf_priv_key"
  32. }
  33. function setup-dots() {
  34. git clone --recurse-submodules "https://github.com/sentriz/dotfiles.git" "$conf_dots_dir"
  35. cd "$conf_dots_dir"
  36. ./install-common
  37. ./install-phone
  38. cd
  39. }
  40. once setup-pacs
  41. once setup-priv-key
  42. once setup-shell
  43. once setup-dots
  44. exec fish