bootstrap.sh 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. #!/bin/bash
  2. #
  3. # Run this script after putting up a new server to get all your preferred
  4. # software and configurations, assuming that you're kzimmermann
  5. #
  6. # -- Environmental considerations: --
  7. #
  8. # Server is assumed to be Debian-ish (at least enough to the point of using apt
  9. # and its repositories)
  10. #
  11. # sources.list is assumed to have been configured to download packages from the
  12. # appropriate repos of your preferences.
  13. #
  14. # -- Major changelog: --
  15. #
  16. # After many years in trademark debate, Firefox finally makes its way back into
  17. # Debian Stable :)
  18. #
  19. # After experimenting heavily with tiling Window managers, I chose to include
  20. # awesome in the installed software list.
  21. #
  22. # Turns out that plain old `xterm' is, by far, much simpler and better a
  23. # terminal emulator than urxvt. So much easier to configure, and somehow I
  24. # don't think we need to read all unicode font ever encountered on the terminal
  25. #
  26. # -- License of use: --
  27. #
  28. # Copyright Klaus Zimmermann 2017 - all rights reserved.
  29. #
  30. # This program is free software: you can redistribute it and/or modify
  31. # it under the terms of the GNU General Public License as published by
  32. # the Free Software Foundation, either version 3 of the License, or
  33. # (at your option) any later version.
  34. #
  35. # This program is distributed in the hope that it will be useful,
  36. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  37. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  38. # GNU General Public License for more details.
  39. #
  40. # You should have received a copy of the GNU General Public License
  41. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  42. #
  43. # Sometimes we just want to update the configuration files to the latest
  44. # version available thanks to `git pull'. If that's the case, answer yes here:
  45. echo "Do you want only to update the configuration files? (y/n)"
  46. read decision
  47. if [[ "$decision" != "y" ]]
  48. then
  49. echo "I'm assuming that you already took the time to configure APT, including"
  50. echo "it's repositories, URLs, distribution, etc."
  51. echo "Shall we proceed? (y/n)"
  52. read gonogo
  53. if [ ${gonogo} != "y" ]; then
  54. echo "Aborted."
  55. exit 1
  56. fi
  57. echo " *** Installation begins ***"
  58. #echo "Updating repositories..."
  59. #apt-get update &> /dev/null
  60. echo "======="
  61. echo "Installing packages..."
  62. echo "yes" | sudo apt-get install \
  63. abiword \
  64. tor \
  65. audacious \
  66. gnumeric \
  67. vim-gtk \
  68. feh \
  69. htop \
  70. g++ \
  71. mc \
  72. mpv \
  73. mutt \
  74. identicurse \
  75. irssi \
  76. audacious \
  77. conky \
  78. sqlite3 \
  79. sudo \
  80. tmux \
  81. keepassx \
  82. calibre \
  83. elinks \
  84. pcmanfm \
  85. privoxy \
  86. mcabber \
  87. viewnior \
  88. xsel \
  89. gajim \
  90. xterm \
  91. virtualenv \
  92. openvpn \
  93. gimp
  94. # now that the packages are installed, let's put some configuration files
  95. # where they belong.
  96. echo "*** Installing dotfiles ***"
  97. else
  98. echo "*** Updating dotfiles ***"
  99. fi
  100. echo "Copying muttrc..."
  101. cp muttrc $HOME/.muttrc
  102. echo "Copying tmux configuration files..."
  103. cp tmux.conf $HOME/.tmux.conf
  104. echo "Copying bashrc..."
  105. cp bashrc $HOME/.bashrc
  106. echo "Copying conkyrc..."
  107. cp conkyrc $HOME/.conkyrc
  108. echo "Copying vimrc..."
  109. cp vimrc $HOME/.vimrc
  110. echo "Copying elinks configuration files..."
  111. cp elinks.conf $HOME/.elinks/
  112. echo "Copying irssi configuration files..."
  113. cp irssiconfig $HOME/.irssi/config
  114. echo "Copying Xresources and Xdefaults (for tmux, urxvt)..."
  115. cp Xresources $HOME/.Xresources
  116. cp Xdefaults $HOME/.Xdefaults
  117. echo "Preparing AwsomeWM's dotfiles..."
  118. mkdir $HOME/.config/awesome
  119. cp rc.lua $HOME/.config/awesome
  120. cp theme.lua $HOME/.config/awesome
  121. echo ""
  122. echo " *** Installation complete. ***"