#!/bin/sh ZMSG=$1 ZBRANCH=$2 if [ -z "$1" ]; then ZMSG="Standard webup" fi if [ -z "$2" ]; then ZBRANCH="master" fi echo "" echo "Adding all new and updated files" git add -A echo "Attempting commit with message '$ZMSG'" CHECKCOMMIT=$(git commit -m "$ZMSG") if [ ${CHECKCOMMIT: -5} == "clean" ]; then echo "The were no items to commit, exiting" exit; fi echo "" git push origin $ZBRANCH echo "Pushed to origin in branch $ZBRANCH" echo ""