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 992B

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