[X2Go-Commits] [maintenancescripts] 03/03: git/misc/setup-repository: use more quoting, curly braces and pushd + popd instead of cd foo; ...; cd ..

git-admin at x2go.org git-admin at x2go.org
Mon Mar 9 00:21:03 CET 2015


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository maintenancescripts.

commit 2575d4fccacd1558263268cb67d9afda971801d7
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Mon Mar 9 00:20:24 2015 +0100

    git/misc/setup-repository: use more quoting, curly braces and pushd + popd instead of cd foo; ...; cd ..
---
 git/misc/setup-repository |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/git/misc/setup-repository b/git/misc/setup-repository
index b62cc1a..0161d34 100755
--- a/git/misc/setup-repository
+++ b/git/misc/setup-repository
@@ -22,12 +22,12 @@ if [ "${#}" -ne "2" ]; then
   exit 1
 fi
 
-PACKAGE="$1"
-DESCRIPTION="$2"
+PACKAGE="${1}"
+DESCRIPTION="${2}"
 
 # Create the repository
-mkdir $PACKAGE.git
-cd $PACKAGE.git
+mkdir "${PACKAGE}.git"
+pushd "${PACKAGE}.git"
 ${GIT} --bare init --shared
 ${GIT} config --add core.logallrefupdates true
 
@@ -93,5 +93,4 @@ mv info/exclude info/exclude.tmp
 chmod 0660 info/exclude.tmp
 
 # Go back to the parent directory
-cd ..
-
+popd

--
Alioth's /srv/git/code.x2go.org/maintenancescripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/maintenancescripts.git


More information about the x2go-commits mailing list