install 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #!/bin/bash
  2. #
  3. # Masalla Icon Theme
  4. #
  5. # Copyright 2022 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. # 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 Icon themes will be installing in $HOME/.icons. To make them available for all users, run this script as root."
  34. else
  35. echo "Masalla Icon themes will be installing in /usr/share/icons and will be available for all users."
  36. fi
  37. echo ""
  38. read -p "Do you want to continue ? [Y]es, [N]o : " response
  39. case $response in
  40. [Yy]* ) ;;
  41. [Nn]* ) exit 99;;
  42. * ) echo "Wrong value: installaton aborted."; exit 1;;
  43. esac
  44. if [ "$UID" -eq "$ROOT_UID" ]
  45. then
  46. ./CLEAN
  47. cp -R ./masalla /usr/share/icons/
  48. cp -R ./masalla-dark /usr/share/icons/
  49. sudo gtk-update-icon-cache /usr/share/icons/masalla*
  50. install_dir=/usr/share/icons/
  51. else
  52. ./CLEAN
  53. cp -R ./masalla $HOME/.icons/
  54. cp -R ./masalla-dark $HOME/.icons/
  55. sudo gtk-update-icon-cache $HOME/.icons/masalla*
  56. install_dir=$HOME/.icons/
  57. fi
  58. echo ""
  59. echo "Your new icon theme Masalla installed in $install_dir"
  60. echo "To find the latest update, please check the main repository :"
  61. echo " https://notabug.org/masalla-art/masalla-icon-theme"
  62. echo ""
  63. echo "Installation complete. Enjoy !"
  64. exit 0