summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2010-05-21 12:51:00 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2010-05-21 12:51:00 +0200
commitc113a090c26191976a77b1a28e012bd90ccc7b14 (patch)
treeb7844f1cc1b5083f864748f11ed4fcb7cb0103cb
parentDo not assume repo path nor post command. (diff)
downloadGitTools-c113a090c26191976a77b1a28e012bd90ccc7b14.tar.xz
GitTools-c113a090c26191976a77b1a28e012bd90ccc7b14.zip
Don't assume presence of postcmd.
-rwxr-xr-xNewProject.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/NewProject.sh b/NewProject.sh
index 191face..c9b2fc1 100755
--- a/NewProject.sh
+++ b/NewProject.sh
@@ -69,10 +69,12 @@ echo -n "[*] Uploading repository..."
git push --all > /dev/null 2>&1 || (echo "failure!"; exit 1)
echo "success."
-# Update cgit by calling script
-echo -n "[*] Updating cgit web interface..."
-ssh $options $connection "$POSTCMD" || (echo "failure!"; exit 1)
-echo "success."
+# Run the post command if there is one
+if [ "$POSTCMD" != "" ]; then
+ echo -n "[*] Running post-command..."
+ ssh $options $connection "$POSTCMD" || (echo "failure!"; exit 1)
+ echo "success."
+fi
# Kill the ssh control master, delete gitssh wrapper
echo -n "[*] Cleaning up..."