install.sh 604 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. execpath="/usr/bin"
  3. hookpath="/etc/pacman.d/hooks"
  4. echo "This will install/update the executable to $execpath and the pacman hook to $hookpath"
  5. read -p "Do you wish to continue [Y/n]? " x
  6. case "$x" in
  7. Y|y|'')
  8. [ ! -r "$execpath" ] && echo "$execpath is not readable. Aborting." && exit 1
  9. #~ [ -f "$execpath/pacmenu" ] && echo "$execpath/pacmenu already exists. Aborting." && exit 1
  10. sudo cp -v pacmenu "$execpath/pacmenu"
  11. [ ! -r "$hookpath" ] && echo "$hookpath is not readable. Not installing pacman hook." && exit 1
  12. sudo cp -v pacmenu.hook "$hookpath/pacmenu.hook"
  13. ;;
  14. *)
  15. exit 1
  16. ;;
  17. esac