瀏覽代碼

rstudtest3

julien colomb 3 年之前
父節點
當前提交
78c91e1c3d
共有 2 個文件被更改,包括 6 次插入5 次删除
  1. 1 0
      .log/gin.log
  2. 5 5
      SSH-INIT-SYNC

+ 1 - 0
.log/gin.log

@@ -3,3 +3,4 @@
 2022-03-30T12:55:19: Sync script executed
 2022-03-30T14:37:37: Sync script executed
 2022-03-30T14:41:19: Sync script executed
+2022-03-30T14:47:39: Sync script executed

+ 5 - 5
SSH-INIT-SYNC

@@ -54,8 +54,9 @@ usage() {
 # Set the variable for synchronisation option, see above 
 syncopt="remove"
 
-if test $(gin remotes) ;
-  then
+
+if ! gin remotes; then
+  echo "set gin remote"
   # set gin remote from git information (on the hu server)
   remotegit=$(git remote get-url origin)
   remotegin="$(echo "$remotegit" | cut -d'/' -f4,5)"
@@ -63,13 +64,12 @@ if test $(gin remotes) ;
   remotegin="$(echo $remotegin | cut -d' ' -f1)"
   remotegin="$(echo "hu:""${remotegin/.git}")"
   gin add-remote primary "$remotegin"
+else
+    echo gin remote set
 fi
 
 
 
-
-
-
 echo "start synchronisation in "$syncopt" mode, close window to cancel. change mode by changing the code in a text application"
 sh .scripts/GIN-SYNC