post-install.sh 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. #! /bin/bash
  2. # COLORS {{{
  3. Bold=$(tput bold)
  4. Underline=$(tput sgr 0 1)
  5. Reset=$(tput sgr0)
  6. # Regular Colors
  7. Red=$(tput setaf 1)
  8. Green=$(tput setaf 2)
  9. Yellow=$(tput setaf 3)
  10. Blue=$(tput setaf 4)
  11. Purple=$(tput setaf 5)
  12. Cyan=$(tput setaf 6)
  13. White=$(tput setaf 7)
  14. # Bold
  15. BRed=${Bold}$(tput setaf 1)
  16. BGreen=${Bold}$(tput setaf 2)
  17. BYellow=${Bold}$(tput setaf 3)
  18. BBlue=${Bold}$(tput setaf 4)
  19. BPurple=${Bold}$(tput setaf 5)
  20. BCyan=${Bold}$(tput setaf 6)
  21. BWhite=${Bold}$(tput setaf 7)
  22. print_line() {
  23. printf "%$(tput cols)s\n"|tr ' ' '-'
  24. }
  25. print_title() {
  26. #clear
  27. print_line
  28. echo -e "# ${BPurple}$1${Reset}"
  29. print_line
  30. echo ""
  31. }
  32. print_question(){
  33. T_COLS=`tput cols`
  34. echo -n "${BBlue}$1${Reset}"
  35. }
  36. print_msg(){
  37. T_COLS=`tput cols`
  38. echo -e "${BGreen}$1${Reset}"
  39. sleep 2
  40. }
  41. print_info() {
  42. #Console width number
  43. T_COLS=`tput cols`
  44. echo -e "${Bold}$1${Reset}\n" | fold -sw $(( $T_COLS - 18 )) | sed 's/^/\t /'
  45. }
  46. print_warning() {
  47. T_COLS=`tput cols`
  48. echo -e "${BYellow}$1${Reset}\n" | fold -sw $(( $T_COLS - 1 ))
  49. sleep 4
  50. }
  51. print_title 'Arch Linux Postinstall'
  52. _cwd="$(pwd)"
  53. alpi_user(){
  54. print_title "User"
  55. print_question "Create new user? [Y|n]"
  56. read yn
  57. yn=${yn:-y}
  58. if [ "$yn" == "y" ]; then
  59. print_question "Enter user name:"
  60. read username
  61. useradd -m -g users -G wheel,sys -s /bin/bash ${username}
  62. chfn ${username}
  63. passwd ${username}
  64. print_msg "user $username created"
  65. echo "$username ALL=(ALL) ALL" >> /etc/sudoers
  66. print_msg "$username added to sudoers"
  67. print_msg "switching now to $username"
  68. su ${username}
  69. fi
  70. }
  71. alpi_avahi(){
  72. print_msg "install avahi"
  73. sudo pacman -S --needed --noconfirm avahi nss-mdns
  74. print_msg "configure avahi"
  75. sudo systemctl enable avahi-daemon
  76. sudo systemctl start avahi-deamon
  77. sed -i.back 's/hosts: files dns myhostname/hosts: files mdns_minimal [NOTFOUND=return] dns myhostname/' /etc/nsswitch.conf
  78. }
  79. alpi_basics(){
  80. print_title "basic packages install"
  81. print_question "install basic pkgs? [Y|n]"
  82. read yn
  83. yn=${yn:-y}
  84. if [ "$yn" == "y" ]; then
  85. sudo pacman -S --needed --noconfirm vim rsync acpi parted imagemagick lynx wget alsa-utils tmux git openssh knockd bluez-utils htop
  86. print_msg 'securing ssh'
  87. sed -i.back 's/^#PermitEmptyPasswords.*/PermitEmptyPasswords no/' /etc/ssh/sshd_config
  88. sed -i.back 's/^#PermitRootLogin.*/PermitRootLogin no/' /etc/ssh/sshd_config
  89. sudo systemctl enable sshd
  90. sudo systemctl start sshd
  91. alpi_avahi
  92. print_msg "basic packages installed"
  93. fi
  94. }
  95. alpi_cosmetics(){
  96. print_title "apply pacman, bash, vim and git config (needs basic pkgs install)"
  97. alpi_basics
  98. # vim
  99. print_msg 'vim configuration'
  100. sudo pacman -S --needed --noconfirm vim-{spell-fr,spell-en,nerdtree,supertab,systemd}
  101. cp $_cwp/assets/vim /home/$USER/.vim
  102. cp $_cwd/assets/vimrc /home/$USER/.vimrc
  103. sudo cp $_cwd/assets/vim /root/.vim
  104. sudo cp $_cwd/assets/vimrc /root/.vimrc
  105. print_msg 'Git Completion'
  106. sudo pacman -S --needed --noconfirm bash-completion
  107. sudo mkdir /etc/bash_completion.d
  108. sudo wget -O /etc/bash_completion.d/git-completion.bash https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
  109. # bash & prompt
  110. print_msg 'Bash and Prompt (liquidprompt)'
  111. git clone https://github.com/nojhan/liquidprompt.git -o github /home/$USER/.liquidprompt
  112. cp $_cwd/assets/bash_profile /home/$USER/.bash_profile
  113. cp $_cwd/assets/bashrc /home/$USER/.bashrc
  114. mkdir /home/$USER/.config
  115. cp $_cwd/assets/config/liquipromptrc /home/$USER/.config/
  116. # sudo pacman -S --needed --noconfirm bash-completion
  117. source /home/$USER/.bashrc
  118. touch /home/$USER/.inputrc
  119. echo 'set show-all-if-ambiguous on' >> /home/$USER/.inputrc
  120. echo 'set completion-ignore-case on' >> /home/$USER/.inputrc
  121. print_msg 'ILoveCandy (pacman)'
  122. sudo sed -i.back 's/.*\[options\].*/&\nILoveCandy/' /etc/pacman.conf
  123. sudo sed -i.back 's/^#Color$/Color/' /etc/pacman.conf
  124. print_msg 'Config and Cosmetics done'
  125. }
  126. # GPG
  127. alpi_gnupg(){
  128. print_title 'Setup a gpg encripting'
  129. print_msg 'see https://wiki.archlinux.org/index.php/GnuPG'
  130. print_question "create your gpg encrypting key? [Y|n] "
  131. read yn
  132. yn=${yn:-y}
  133. if [ "$yn" == "y" ]; then
  134. gpg --full-gen-key
  135. fi
  136. print_msg 'Gnupg done!'
  137. }
  138. alpi_secure(){
  139. print_title 'Basic securing system'
  140. print_msg 'remove root autologin'
  141. sudo sed -i.back 's/--autologin root //' /etc/systemd/system/getty@tty1.service.d/autologin.conf
  142. print_msg 'remove root login'
  143. sudo sed -i.back 's/#auth\srequired\spam_wheel.so\suse_uid/auth required spam_wheel.so use_uid/' /etc/pam.d/su
  144. sudo sed -i.back 's/#auth\srequired\spam_wheel.so\suse_uid/auth required spam_wheel.so use_uid/' /etc/pam.d/su-l
  145. print_msg 'restrict log access to root'
  146. sudo touch /etc/sysctl.d/50-dmesg-restrict.conf
  147. sudo sh -c "echo 'kernel.dmesg_restrict = 1' >> /etc/sysctl.d/50-dmesg-restrict.conf"
  148. sudo touch /etc/sysctl.d/50-kptr-restrict.con
  149. sudo sh -c "echo 'kernel.kptr_restrict = 1' >> /etc/sysctl.d/50-kptr-restrict.conf"
  150. print_msg 'basics secure done'
  151. }
  152. # Display Manager
  153. alpi_xserver(){
  154. print_title "install Graphical Display Part 1 : Xorg server"
  155. print_msg "you will have to reboot at the end of part 1"
  156. print_question "install xorg server? [Y|n] "
  157. read yn
  158. yn=${yn:-y}
  159. if [ "$yn" == "y" ]; then
  160. # touch pad
  161. sudo pacman -S --needed --noconfirm xf86-input-libinput
  162. # integred gpu
  163. sudo pacman -S --needed --noconfirm xf86-input-libinput xf86-video-intel
  164. # discret gpu
  165. sudo pacman -S --needed --noconfirm bbswitch bumblebee primus
  166. sudo pacman -S --needed --noconfirm nvidia nvidia-utils
  167. # xorg server
  168. sudo pacman -S --needed --noconfirm xorg-xinit xorg-server-devel xorg-xrandr
  169. sudo pacman -S --needed --noconfirm mesa mesa-demos
  170. # config
  171. sudo gpasswd -a $USER bumblebee
  172. sudo systemctl enable bumblebeed
  173. print_warning "xorg install complete, after reboot, please run part 2 : Desktop manager Plasma5"
  174. print_warning "press enter to reboot"
  175. read x
  176. sudo reboot
  177. fi
  178. }
  179. alpi_plasma5(){
  180. print_title "install Graphical Display Part 2 : Desktop Manager Plasma 5"
  181. print_question "install Kde Plasma 5? [Y|n] "
  182. read yn
  183. yn=${yn:-y}
  184. if [ "$yn" == "y" ]; then
  185. sudo pacman -S --needed --noconfirm --force plasma-meta
  186. sudo pacman -S --needed --noconfirm ttf-{dejavu,liberation,droid,ubuntu-font-family}
  187. # network & Bluetooth
  188. sudo pacman -S --needed --noconfirm networkmanager-openvpn pulseaudio-alsa rfkill systemd-kcm bluedevil
  189. sudo systemctl enable NetworkManager
  190. sudo systemctl start NetworkManager
  191. sudo systemctl enable bluetooth
  192. sudo systemctl start bluetooth
  193. touch /home/$USER/.xinitrc
  194. echo 'exec startkde' > /home/$USER/.xinitrc
  195. print_msg "Plasma 5 install complete!"
  196. print_msg 'run "startx" to start x server with kde plasma 5'
  197. fi
  198. }
  199. # Yaourt
  200. alpi_yaourt(){
  201. print_title "AUR helper : Yaourt"
  202. print_question "install Yaourt [Y|n] "
  203. read yaourt
  204. yaourt=${yaourt:-y}
  205. if [ "$yaourt" == "y" ]; then
  206. sudo pacman -S --needed base-devel
  207. mkdir -p /home/$USER/Developer/Linux/build-repos
  208. wget -O /home/$USER/Developer/Linux/build-repos/package-query.tar.gz https://aur.archlinux.org/cgit/aur.git/snapshot/package-query.tar.gz
  209. wget -O /home/$USER/Developer/Linux/build-repos/yaourt.tar.gz https://aur.archlinux.org/cgit/aur.git/snapshot/yaourt.tar.gz
  210. cd /home/$USER/Developer/Linux/build-repos
  211. tar -xvf package-query.tar.gz
  212. tar -xvf yaourt.tar.gz
  213. cd package-query
  214. makepkg -sri
  215. cd ../yaourt
  216. makepkg -sri
  217. echo 'ask for editing config file before build'
  218. echo "EDITFILES=1" >> ~/.yaourtrc
  219. print_msg "Yaourt install complete!"
  220. fi
  221. }
  222. alpi_cups(){
  223. print_title 'CUPS (for printing)'
  224. print_question "install cups [Y|n] "
  225. read yn
  226. yn=${yn:-y}
  227. if [ "$yn" == "y" ]; then
  228. sudo pacman -S --needed --noconfirm cups cups-filters libcups ghostscript gsfonts
  229. sudo pacman -S --needed --noconfirm gutenprint splix cups-pdf
  230. sudo pacman -S --needed --noconfirm print-manager
  231. alpi_avahi
  232. sudo systemctl enable org.cups.cupsd
  233. sudo systemctl start org.cups.cupsd
  234. sudo systemctl enable cups-browsed
  235. sudo systemctl start cups-browsed
  236. print_msg "CUPS install complete!"
  237. print_warning "add your user to the sys group if you want to be able to add printers"
  238. fi
  239. }
  240. # kernel LTS
  241. alpi_kernellts(){
  242. print_title "Long Term Support Kernel"
  243. print_question "install kernel-lts)? [Y|n]"
  244. read yn
  245. yn=${yn:-y}
  246. if [ "$yn" == "y" ]; then
  247. sudo pacman -S linux-lts linux-lts-headers nvidia-lts bbswitch-lts
  248. # TODO : add entrie for lts kernel on /boot/loader/entries
  249. print_msg "kernel LTS install complete!"
  250. fi
  251. }
  252. alpi_mysql(){
  253. print_msg "installe mysql"
  254. sudo pacman -S --needed --noconfirm mariadb
  255. print_msg "configure mysql"
  256. sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
  257. mysql_secure_installation
  258. sudo sed -i.back 's/^log-bin=mysql-bin$/#&/' /etc/mysql/my.cnf
  259. sudo sed -i.back 's/^max_allowed_packet.*$/max_allowed_packet = 16M/' /etc/mysql/my.cnf
  260. }
  261. # Packages
  262. alpi_defaultpkgs(){
  263. print_title "Day to day software"
  264. print_question "install day to day packages? [Y|n]"
  265. read yn
  266. yn=${yn:-y}
  267. if [ "$yn" == "y" ]; then
  268. print_msg "file explorer : Dolphin"
  269. sudo pacman -S --needed --noconfirm dolphin dolphin-plugins
  270. print_msg 'Pim softwares : mail, calendar, contact, etc'
  271. sudo pacman -S --needed --noconfirm kmail korganizer kaddressbook kdeconnect kleopatra pidgin
  272. sudo pacman -S --needed --noconfirm spamassassin razor
  273. sudo sa-update
  274. print_question "Install regular mysql support for akonadi? [Y|n] "
  275. read ako
  276. ako=${ako:-y}
  277. if [ "$ako" == "y" ]; then
  278. print_question "Should we install and configure mysql (if not already done)? [y|N] "
  279. read sql
  280. sql=${sql:-n}
  281. if [ "$sql" == "y" ]; then
  282. alpi_mysql
  283. fi
  284. # https://forum.kde.org/viewtopic.php?t=84478#p140762
  285. print_question "please type your root mysql password :"
  286. read -s -p Password: pswd
  287. mysql -u root -p$pswd -e "create database akonadi;"
  288. mysql -u root -p$pswd -e "create user 'akonadi'@'localhost' identified by 'akonadi';"
  289. mysql -u root -p$pswd -e "grant all privileges on akonadi.* to 'akonadi'@'localhost';"
  290. mysql -u root -p$pswd -e "flush privileges;"
  291. mkdir -p /home/$USER/.config/akonadi
  292. mv /home/$USER/.config/akonadi/akonadiserverrc /home/$USER/.config/akonadi/akonadiserverrc.back
  293. cp $_cwd/assets/akonadiserverrc /home/$USER/.config/akonadi/
  294. print_msg "Akonadi configured to use system wide sql server!"
  295. fi
  296. print_msg "web browser, terminal emulator, disk tool, password tool"
  297. sudo pacman -S --needed --noconfirm chromium terminator gparted keepass
  298. print_msg 'install office softwares'
  299. sudo pacman -S --needed --noconfirm gwenview kimageformats kdegraphics-okular kipi-plugins libreoffice-fresh hunspell-{fr,en}
  300. print_msg 'install media softwares'
  301. sudo pacman -S --needed --noconfirm digikam darktable vlc lua-socket ktorrent banshee
  302. print_msg 'install graphic softwares'
  303. sudo pacman -S --needed --noconfirm inkscape gimp scribus fontforge blender
  304. print_msg 'web dev softwares'
  305. sudo pacman -S --needed --noconfirm firefox filezilla gulp
  306. print_msg 'install cloud softwares'
  307. sudo pacman -S --needed --noconfirm owncloud-client syncthing syncthing-gtk syncthing-inotify
  308. print_msg 'increase inotify watch limit'
  309. sleep 3
  310. sudo cp $_cwd/assets/90-inotify.conf /etc/sysctl.d/
  311. if [ -f /usr/bin/yaourt ];
  312. then
  313. yaourt -S downgrade
  314. yaourt -S atom-editor
  315. yaourt -S pulseaudio-dlna
  316. else
  317. print_warning "some packages can't be installed because you don't have yaourt installed"
  318. fi
  319. fi
  320. }
  321. # LAMP
  322. alpi_lamp(){
  323. # https://wiki.archlinux.org/index.php/Apache_HTTP_Server
  324. print_title "Web Server (apache, php, mysql)"
  325. print_question "Install apache php mysql? [Y|n] "
  326. read yn
  327. yn=${yn:-y}
  328. if [ "$yn" == "y" ]; then
  329. sudo pacman -S --needed --noconfirm apache php php-apache phpmyadmin php-mcrypt php-gd
  330. print_question "Should we install and configure mysql (if not already done)? [y|N] "
  331. read sql
  332. sql=${sql:-n}
  333. if [ "$sql" == "y" ]; then
  334. alpi_mysql
  335. fi
  336. print_msg "configure apache"
  337. sudo sed -i.back 's/^LoadModule mpm_event_module modules\/mod_mpm_event\.so$/#&/' /etc/httpd/conf/httpd.conf
  338. sudo sed -i.back 's/^#LoadModule mpm_prefork_module modules\/mod_mpm_prefork\.so$/LoadModule mpm_prefork_module modules\/mod_mpm_prefork.so/' /etc/httpd/conf/httpd.conf
  339. sudo sed -i.back 's/^#LoadModule rewrite_module modules\/mod_rewrite\.so$/LoadModule rewrite_module modules\/mod_rewrite.so/' /etc/httpd/conf/httpd.conf
  340. print-msg "configure vhosts folder"
  341. sudo mkdir /etc/httpd/conf/vhosts
  342. sudo sed -i.back 's/^#Include conf\/extra\/httpd-vhosts\.conf$/&\nInclude conf\/vhosts\/*.conf/' /etc/httpd/conf/httpd.conf
  343. print_msg "configure apache for php"
  344. sudo sed -i.back 's/^LoadModule dir_module modules\/mod_dir\.so$/&\nLoadModule php5_module modules\/libphp5.so/' /etc/httpd/conf/httpd.conf
  345. sudo sh -c "echo 'Include conf/extra/php5_module.conf' >> /etc/httpd/conf/httpd.conf"
  346. print_msg "configure php"
  347. sudo sed -i.back 's/^memory_limit.*$/memory_limit = 512M/' /etc/php/php.ini
  348. sudo sed -i.back 's/^error_reporting.*$/error_reporting = E_ALL \& ~E_NOTICE/' /etc/php/php.ini
  349. sudo sed -i.back 's/;extension=gd\.so/extension=gd.so/' /etc/php/php.ini
  350. print_question "Should we configure custom basedir folder for php? [Y|n] "
  351. read bd
  352. sql=${bd:-y}
  353. if [ "$bd" == "y" ]; then
  354. print_question "Please enter the basedir path"
  355. read basedir
  356. sudo sed -i.back "s/^open_basedir = .*$/&:${basedir}/" /etc/php/php.ini
  357. fi
  358. print_msg "configure php for mysql"
  359. sudo sed -i.back 's/;extension=pdo_mysql\.so/extension=pdo_mysql.so/' /etc/php/php.ini
  360. print_msg "configure phpmyadmin"
  361. sudo sed -i.back 's/;extension=mysqli\.so/extension=mysqli.so/' /etc/php/php.ini
  362. sudo sed -i.back 's/;extension=mcrypt\.so/extension=mcrypt.so/' /etc/php/php.ini
  363. sudo sed -i.back 's/;extension=bz2\.so/extension=bz2.so/' /etc/php/php.ini
  364. sudo sed -i.back 's/;extension=zip\.so/extension=zip.so/' /etc/php/php.ini
  365. sudo sed -i.back 's/^open_basedir = .*$/&:\/etc\/webapps\//' /etc/php/php.ini
  366. # TODO : instal drush
  367. fi
  368. }
  369. alpi_bumblebee(){
  370. # https://wiki.archlinux.org/index.php/Bumblebee
  371. print_title "Bumblebee"
  372. print_question "Install Bumblebee? [Y|n] "
  373. read yn
  374. yn=${yn:-y}
  375. if [ "$yn" == "y" ]; then
  376. sudo pacman -S --needed --no-confirm bumblebee nvidia
  377. sudo gpasswd -a $USER bumblebee
  378. sudo systemctl enable bumblebeed
  379. sudo systemctl start bumblebeed
  380. sudo pacman -S --needed --no-confirm mesa-demo
  381. print_msg "run optirun glxgears --info to test your install"
  382. print_msg "Install primus bridge for better performances"
  383. sudo pacman -S --needed --no-confirm primus lib32-primus
  384. sudo sed -i.back 's/^Bridge=auto$/Bridge=primus/' /etc/bumblebee/bumblebee.conf
  385. print_msg "Install bbswitch to turn on and off discret card automatically (only for laptops)"
  386. sudo pacman -S --needed --no-confirm bbswitch
  387. fi
  388. }
  389. alpi_steam(){
  390. # https://wiki.archlinux.org/index.php/Steam
  391. print_title "Steam"
  392. print_question "Install steam? [Y|n] "
  393. read yn
  394. yn=${yn:-y}
  395. if [ "$yn" == "y" ]; then
  396. alpi_bumblebee
  397. print_msg "Enable Multilib repository package"
  398. sudo sed -i.back 's/^#[multilib]$/[multilib]/' /etc/pacman.conf
  399. sudo sed -i.back 's/^#Include = \/etc/pacman\.d\/mirrorlist$/Include = /etc/pacman.d/mirrorlis/' /etc/pacman.conf
  400. sudo pacman -Syy
  401. sudo pacman -S --needed --no-confirm lib32-virtualgl lib32-mesa-libgl lib32-nvidia-utils lib32-alsa-plugins ttf-liberation lib32-curl
  402. sudo pacman -S --needed --no-confirm steam
  403. fi
  404. }
  405. # END
  406. alpi_end(){
  407. print_question "Reboot now? [Y|n] "
  408. read yn
  409. yn=${yn:-y}
  410. if [ "$yn" != "y" ]; then
  411. print_warning "depending on what you've done you may need to reboot"
  412. exit
  413. fi
  414. print_msg "Rebooting in 5sec"
  415. sleep 3
  416. reboot
  417. }
  418. alpi_menu(){
  419. while true
  420. do
  421. print_question "choose an action (preferably in proposed order)"
  422. echo
  423. action_list=("create user" "install basics" "cosmetics" "create gnupgp key" "secure the system" "install Xorg Server" "install Plasma 5 (kde)" "yaourt" "cups (printers)" "switch to LTS kernel" "install default packages" "install lamp" "install bumblebee" "install steam" "end");
  424. select action in "${action_list[@]}"; do
  425. case "$REPLY" in
  426. 1)
  427. alpi_user
  428. ;;
  429. 2)
  430. alpi_basics
  431. ;;
  432. 3)
  433. alpi_cosmetics
  434. ;;
  435. 4)
  436. alpi_gnupg
  437. ;;
  438. 5)
  439. alpi_secure
  440. ;;
  441. 6)
  442. alpi_xserver
  443. ;;
  444. 7)
  445. alpi_plasma5
  446. ;;
  447. 8)
  448. alpi_yaourt
  449. ;;
  450. 9)
  451. alpi_cups
  452. ;;
  453. 10)
  454. alpi_kernellts
  455. ;;
  456. 11)
  457. alpi_defaultpkgs
  458. ;;
  459. 12)
  460. alpi_lamp
  461. ;;
  462. 13)
  463. alpi_bumblebee
  464. ;;
  465. 14)
  466. alpi_steam
  467. ;;
  468. 15)
  469. alpi_end
  470. ;;
  471. *)
  472. print_warning "dommage, essaye encore"
  473. ;;
  474. esac
  475. [[ -n $OPT ]] && break
  476. done
  477. done
  478. }
  479. alpi_menu