INSTALL.sh 799 B

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