INSTALL.sh 825 B

123456789101112131415161718
  1. #!/usr/bin/bash
  2. # Xyzzy installer 1.0.4.5
  3. # This program is free software is under the ISC Licence. See COPYING for more information.
  4. echo "Are you sure you want to install Mahaer Mahmud's xyzzy script?"
  5. read -r -p '[y/n] ' prompt # yes/no option
  6. prompt=${prompt,,} # allows options in lowercase
  7. if [[ "$prompt" =~ ^(yes|y)$ ]] # if the prompt is yes, y, Y, etc.
  8. then
  9. sudo cp -f xyzzy /usr/bin/xyzzy # installs the script itself
  10. sudo mkdir /usr/share/doc/xyzzy/ # makes documentation folder
  11. sudo cp -f README.md /usr/share/doc/xyzzy/ # copies README to the documentation folder
  12. sudo mkdir /usr/share/licenses/xyzzy/ # makes licence folder
  13. sudo cp -f COPYING /usr/share/licenses/xyzzy/ # installs the licence
  14. echo 'You have sucessfully installed the program.'
  15. else
  16. echo 'You have cancelled installation.'
  17. fi # closes script