install-themes.sh 344 B

123456789101112131415
  1. #!/bin/sh
  2. die()
  3. {
  4. printf "$*\n"
  5. exit 1
  6. }
  7. DIRECTORY="$HOME/.gnome2/gedit/styles/"
  8. THEMES="themes"
  9. if [ ! -d "${DIRECTORY}" ]; then
  10. mkdir -vp "${DIRECTORY}" || die "ERRO, ${DIRECTORY} not created. ABORT."
  11. fi
  12. [ ! -d "${THEMES}" ] && die "Directory ${THEMES} no exist. ABORT"
  13. cd "${THEMES}" && cp *.xml "${DIRECTORY}" && printf "OK...\n"