install.sh 2.7 KB

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