|
@@ -20,9 +20,16 @@ usage() {
|
|
|
|
|
|
syncopt="2"
|
|
|
|
|
|
-echo "Enter commit message: "
|
|
|
+echo "Optionally enter a commit message, and hit return: "
|
|
|
read commitmessage
|
|
|
|
|
|
+if [[ "$commitmessage" == "" ]]; then
|
|
|
+ echo "using date as commit message"
|
|
|
+ commitmessage="commit on $(date +%Y-%m-%d)"
|
|
|
+fi
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
checkargs() {
|
|
|
case "$1" in
|
|
@@ -67,7 +74,7 @@ echo "$(date +'%Y-%m-%dT%H:%M:%S'): Sync script executed" >> ./.log/gin.log
|
|
|
echo "Synchronising submodules"
|
|
|
git submodule foreach gin sync
|
|
|
checkerror $? "Error occurred during 'gin sync'"
|
|
|
-git submodule foreach gin commit .
|
|
|
+git submodule foreach gin commit . -m "$commitmessage"
|
|
|
checkerror $? "Error occurred during 'gin commit'"
|
|
|
git submodule foreach gin upload
|
|
|
checkerror $? "Error occurred during 'gin upload'"
|
|
@@ -85,7 +92,7 @@ if [[ "${syncopt}" <1 ]]; then
|
|
|
|
|
|
echo "Synchronising main repository"
|
|
|
gin sync
|
|
|
-gin commit .
|
|
|
+gin commit . -m "$commitmessage"
|
|
|
gin upload
|
|
|
# remove uploaded (annexed) content
|
|
|
if [[ "$syncopt" > 1 ]]; then
|