Browse Source

git-annex in jcolomb@MacBook-Pro-4

julien colomb 3 years ago
parent
commit
676895c726
3 changed files with 12 additions and 4 deletions
  1. 1 0
      .log/gin.log
  2. 1 1
      06_disseminations/02_manuscript
  3. 10 3
      sync

+ 1 - 0
.log/gin.log

@@ -1,2 +1,3 @@
 2021-02-27T17:39:42: Sync script executed
 2021-02-27T20:51:48: Sync script executed
+2021-02-27T21:12:50: Sync script executed

+ 1 - 1
06_disseminations/02_manuscript

@@ -1 +1 @@
-Subproject commit 0d12c8efb8824c9914529a54491f1c051bbff4e5
+Subproject commit 0766b29a0f64463e12a5abff8fd899e51952671a

+ 10 - 3
sync

@@ -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