install.sh 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #!/bin/sh
  2. # author : bachir soussi chiadmi
  3. # date : 10/06/2016
  4. _cwd="$(pwd)"
  5. # candy
  6. echo 'ILoveCandy (pacman)'
  7. sudo sed -i.back 's/.*\[options\].*/&\nILoveCandy/' /etc/pacman.conf
  8. sudo sed -i.back 's/^#Color$/Color/' /etc/pacman.conf
  9. sudo sed -i.back 's/^#TotalDownload$/TotalDownload/' /etc/pacman.conf
  10. sudo pacman -Syyu
  11. sudo pacman -S --needed --noconfirm vim rsync wget tmux
  12. # vim
  13. echo 'vim configuration'
  14. sudo pacman -S --needed --noconfirm vim-{spell-fr,spell-en,nerdtree,supertab,systemd}
  15. cp -r $_cwp/assets/vim /home/$USER/.vim
  16. cp $_cwd/assets/vimrc /home/$USER/.vimrc
  17. sudo cp -r $_cwd/assets/vim /root/.vim
  18. sudo cp $_cwd/assets/vimrc /root/.vimrc
  19. # git
  20. echo 'Git Completion'
  21. sudo pacman -S --needed --noconfirm bash-completion
  22. sudo mkdir /etc/bash_completion.d
  23. sudo wget -O /etc/bash_completion.d/git-completion.bash https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
  24. # yaourt
  25. # only needed for gps with pynmea2 on python
  26. sudo pacman -S --needed --noconfirm base-devel
  27. mkdir -p /home/$USER/build-repos
  28. wget -O /home/$USER/build-repos/package-query.tar.gz https://aur.archlinux.org/cgit/aur.git/snapshot/package-query.tar.gz
  29. wget -O /home/$USER/build-repos/yaourt.tar.gz https://aur.archlinux.org/cgit/aur.git/snapshot/yaourt.tar.gz
  30. cd /home/$USER/build-repos
  31. tar -xvf package-query.tar.gz
  32. tar -xvf yaourt.tar.gz
  33. cd package-query
  34. makepkg -sri
  35. cd ../yaourt
  36. makepkg -sri
  37. echo "EDITFILES=1" >> ~/.yaourtrc
  38. echo "Yaourt install complete!"
  39. # bash & prompt
  40. echo 'Bash and Prompt (liquidprompt)'
  41. git clone https://github.com/nojhan/liquidprompt.git -o github /home/$USER/.liquidprompt
  42. cp $_cwd/assets/bash_profile /home/$USER/.bash_profile
  43. cp $_cwd/assets/bashrc /home/$USER/.bashrc
  44. mkdir /home/$USER/.config
  45. cp $_cwd/assets/config/liquidpromptrc /home/$USER/.config/
  46. source /home/$USER/.bashrc
  47. # hostname
  48. sudo hostnamectl set-hostname hehe-rail-rover
  49. sudo sed -i 's/localhost$/&\thehe-rail-rover/' /etc/hosts
  50. sudo sed -i 's/^hostname$/&\thehe-rail-rover/' /etc/dhcpcd.conf
  51. # avahi
  52. echo "install avahi"
  53. sudo pacman -S --needed --noconfirm avahi nss-mdns
  54. echo "configure avahi"
  55. sudo systemctl enable avahi-daemon
  56. sudo systemctl start avahi-deamon
  57. sudo sed -i 's/hosts: files dns myhostname/hosts: files mdns_minimal [NOTFOUND=return] dns hehe-rail-rover/' /etc/nsswitch.conf
  58. # Camera
  59. echo "Camera Module"
  60. sudo sed -i.back 's/gpu_mem=64$/gpu_mem=128\nstart_file=start_x.elf\nfixup_file=fixup_x.dat/' /boot/config.txt
  61. # gps cli
  62. sudo sed -i 's/console=ttyAMA0,115200//' /boot/cmdline.txt
  63. sudo sed -i 's/kgdboc=ttyAMA0,115200//' /boot/cmdline.txt
  64. sudo systemctl disable serial-getty@ttyAMA0.service
  65. sudo pacman -S --needed --noconfirm minicom gpsd
  66. #sudo systemctl stop gpsd.socket
  67. #sudo systemctl disable gpsd.socket
  68. sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock
  69. # gps python