From feeaddef1f0c86b892491d29f80437c1d4380196 Mon Sep 17 00:00:00 2001 From: Jonathan Terner Date: Thu, 17 Aug 2017 11:54:14 -0400 Subject: [PATCH] apply-colors.sh: added error handling message to gconftools --- apply-colors.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/apply-colors.sh b/apply-colors.sh index 153a396..51c538d 100644 --- a/apply-colors.sh +++ b/apply-colors.sh @@ -175,7 +175,17 @@ else fi # Fallback for Gnome 2 and early Gnome 3 - [[ -z "$GCONFTOOL" ]] && GCONFTOOL=gconftool + + # error handling on gconftool + if [[ -z "$GCONFTOOL" ]]; then + GCONFTOOL=$(which gconftool 2>/dev/null) + if [[ "$?" -ne 0 ]]; then + echo "Error gconftool not found!" + echo "Possible fix, enter the following and run again:" + echo "export GCONFTOOL=/path/to/gconftool/" + exit 1 + fi + [[ -z "$BASE_KEY" ]] && BASE_KEY=/apps/gnome-terminal/profiles PROFILE_KEY="$BASE_KEY/$PROFILE_SLUG"