summaryrefslogtreecommitdiffstats
path: root/tdescreensaver
diff options
context:
space:
mode:
Diffstat (limited to 'tdescreensaver')
-rwxr-xr-xtdescreensaver/kxsconfig/update_hacks.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/tdescreensaver/kxsconfig/update_hacks.sh b/tdescreensaver/kxsconfig/update_hacks.sh
index 7d4deca7..ea4a457f 100755
--- a/tdescreensaver/kxsconfig/update_hacks.sh
+++ b/tdescreensaver/kxsconfig/update_hacks.sh
@@ -11,13 +11,16 @@ fi
# Gets list of screensavers. Exclude 'config'.
scsvs=""
-pushd "${XSDIR}" >/dev/null
-for i in *; do
- if [ "${i}" != "config" ]; then
- scsvs="${scsvs} ${i}"
- fi
-done
-popd >/dev/null
+if [ -d "$XSDIR" ]; then
+ LASTD=$PWD
+ cd "${XSDIR}" >/dev/null
+ for i in *; do
+ if [ "${i}" != "config" ]; then
+ scsvs="${scsvs} ${i}"
+ fi
+ done
+ cd "$LASTD"
+fi
echo $scsvs