INSTALL 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #!/bin/bash
  2. #
  3. # Masalla Icon Theme
  4. #
  5. # Copyright 2018 hayder majid <hayder@riseup.net>
  6. #
  7. # This program is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 3 of the License, or
  10. # (at your option) any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with this program; if not, you can download it from here:
  19. # https://www.gnu.org/licenses/gpl-3.0.html
  20. #
  21. # installing script for masalla icon themes
  22. # Written by Hayder Majid (Hayder Ctee) <hayder@riseup.net> (thanks to Tiheum <matthieu.james@gmail.com> for writting his script :-) )
  23. echo ""
  24. cat Banner1.txt
  25. sleep 1.5
  26. cat Banner2.txt
  27. sleep 1.5
  28. cat Banner3.txt
  29. sleep 1.5
  30. ROOT_UID=0
  31. if [ "$UID" -ne "$ROOT_UID" ]
  32. then
  33. echo "Masalla Colors will be installing in $HOME/.icons. To make them available for all users, run this script as root."
  34. echo "make sure you have (masalla icon theme > 1.0) installed on your system befor you continue"
  35. else
  36. echo "Masalla Colors will be installing in /usr/share/icons and are available for all users."
  37. echo "make sure you have (masalla icon theme > 1.0) installed on your system befor you continue"
  38. fi
  39. read -p "Do you want to continue ? [Y]es, [N]o : " response
  40. case $response in
  41. [Yy]* ) ;;
  42. [Nn]* ) exit 99;;
  43. * ) echo "Wrong value: installaton aborted."; exit 1;;
  44. esac
  45. if [ -d $HOME/.icons/masalla ]
  46. then
  47. echo
  48. read -p "An existing installation have been detected in $HOME/.icons. Remove it previously ? [Y]es, [N]o :" response
  49. case $response in
  50. [Yy]* ) ./CLEAN ;;
  51. * ) ;;
  52. esac
  53. fi
  54. if [ "$UID" -eq "$ROOT_UID" ]
  55. then
  56. ./CLEAN
  57. cp -R ./masalla* /usr/share/icons/
  58. install_dir=/usr/share/icons/
  59. else
  60. ./CLEAN
  61. cp -R ./masalla* $HOME/.icons/
  62. install_dir=$HOME/.icons/
  63. fi
  64. echo ""
  65. echo "Your new Masalla Icon Theme installed in $install_dir"
  66. echo "To find the latest update, please check the main repository :"
  67. echo " https://notabug.org/masalla-art/masalla-icon-theme"
  68. echo ""
  69. echo "Installation complete. Enjoy !"
  70. exit 0