From: martin f. krafft Date: Thu, 1 May 2008 21:40:33 +0000 (+0100) Subject: only chdir when necessary X-Git-Url: https://git.madduck.net/code/mbuild.git/commitdiff_plain/9403b805df693f128340ebabfd49c943f84e7dbd?hp=2d0bda4f59416388f340fc07fa1ff1eecf9f0756 only chdir when necessary --- diff --git a/mbuild.sh b/mbuild.sh index e102122..fab50d2 100755 --- a/mbuild.sh +++ b/mbuild.sh @@ -30,8 +30,6 @@ if [ -z "$KEYID" ]; then exit 1 fi -cd "$BUILDDIR" - sbuild_args= schangesfile= arch= @@ -65,7 +63,10 @@ done schangesfile_basename="${schangesfile##*/}" packagenameversion="${schangesfile_basename%_*}" -cd "${schangesfile%/*}" +case "$schangesfile" in + */*) cd "${schangesfile%/*}";; + *) :;; +esac dcmd cp "${schangesfile##*/}" "$BUILDDIR" schangesfile="$schangesfile_basename"