aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/makerpm.sh
diff options
context:
space:
mode:
authorAvuton Olrich <avuton@gmail.com>2006-07-22 22:27:48 +0000
committerAvuton Olrich <avuton@gmail.com>2006-07-22 22:27:48 +0000
commit0532c9ab4c3686adfaa7eaf8e8ec2217a2cfb59d (patch)
tree5f05ac581a25e4b2a34f8b75825737e24a7c3a7d /scripts/makerpm.sh
parentc454122a021d705c5ddfa74913d53c18aa078ecb (diff)
downloadmpd-0532c9ab4c3686adfaa7eaf8e8ec2217a2cfb59d.tar.gz
mpd-0532c9ab4c3686adfaa7eaf8e8ec2217a2cfb59d.tar.xz
mpd-0532c9ab4c3686adfaa7eaf8e8ec2217a2cfb59d.zip
Do a better job of trying to be able to run these
scripts from 'anywhere' git-svn-id: https://svn.musicpd.org/mpd/trunk@4430 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rwxr-xr-xscripts/makerpm.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/makerpm.sh b/scripts/makerpm.sh
index 52104c8af..bfa2b47f0 100755
--- a/scripts/makerpm.sh
+++ b/scripts/makerpm.sh
@@ -4,9 +4,9 @@ PWD=`pwd`
## If we're not in the scripts directory
## assume the base directory.
-if test "`basename $PWD`" != "scripts" && \
- test -d scripts; then
- cd scripts
+if test "`basename $PWD`" != "scripts"; then
+ MYOLDPWD=`pwd`
+ cd `dirname $0`
fi
./makedist.sh
@@ -25,5 +25,5 @@ then
fi
if test "`basename $PWD`" != "scripts"; then
- cd ..
+ cd $MYOLDPWD
fi