From 4cd2171720c4dd4ce79c85a7ef61b6ab47edd195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 18 Aug 2013 19:38:28 +0200 Subject: [PATCH] Remove bashism from kxsconfig/update_hacks.sh --- tdescreensaver/kxsconfig/update_hacks.sh | 17 ++++++++++------- 1 file 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