Simple image host.
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.

setup.sh 835B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/sh
  2. commands_missing=0
  3. check_exists()
  4. {
  5. which "$1" 1> /dev/null
  6. if [ "$?" -ne 0 ]; then
  7. commands_missing=1
  8. echo "Missing command: $1"
  9. fi
  10. }
  11. check_exists "zsh"
  12. check_exists "tmux"
  13. check_exists "vim"
  14. check_exists "python"
  15. check_exists "xdotool"
  16. check_exists "i3"
  17. check_exists "compton"
  18. check_exists "amixer"
  19. check_exists "xbacklight"
  20. check_exists "feh"
  21. if [ $commands_missing -ne 0 ]; then
  22. echo "Some commands are missing. Continue? (y/n)"
  23. read response
  24. if [ "$response" != "y" ]; then
  25. echo "Aborting."
  26. exit 1
  27. fi
  28. fi
  29. echo "Copying dotfiles..."
  30. cd dotfiles
  31. for f in *; do
  32. rm -rf "$HOME/.$f"
  33. cp -r "$f" "$HOME/.$f"
  34. done
  35. cd ..
  36. echo "Done."
  37. echo "Copying executables..."
  38. mkdir -p "$HOME/bin"
  39. cd bin
  40. for f in *; do
  41. rm -rf "$HOME/bin/$f"
  42. cp -r "$f" "$HOME/bin/$f"
  43. done
  44. cd ..
  45. echo "Done."
  46. echo "Everything set up!"