diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2013-08-18 19:38:28 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-08-18 19:38:28 +0200 |
commit | 4cd2171720c4dd4ce79c85a7ef61b6ab47edd195 (patch) | |
tree | b7a71b003126ef440c9a4829913e66334e1f5a72 | |
parent | a6a9c6236a74643d07308b47751fe8438b4f845c (diff) | |
download | tdeartwork-4cd2171720c4dd4ce79c85a7ef61b6ab47edd195.tar.gz tdeartwork-4cd2171720c4dd4ce79c85a7ef61b6ab47edd195.zip |
Remove bashism from kxsconfig/update_hacks.sh
-rwxr-xr-x | tdescreensaver/kxsconfig/update_hacks.sh | 17 |
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 |