diff options
author | 2010-05-21 12:51:00 +0200 | |
---|---|---|
committer | 2010-05-21 12:51:00 +0200 | |
commit | c113a090c26191976a77b1a28e012bd90ccc7b14 (patch) | |
tree | b7844f1cc1b5083f864748f11ed4fcb7cb0103cb | |
parent | Do not assume repo path nor post command. (diff) | |
download | GitTools-c113a090c26191976a77b1a28e012bd90ccc7b14.tar.xz GitTools-c113a090c26191976a77b1a28e012bd90ccc7b14.zip |
Don't assume presence of postcmd.
-rwxr-xr-x | NewProject.sh | 10 |
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..." |