Browse Source

Fri May 13 22:34:18 BST 2022

Gabriel Capella 1 year ago
parent
commit
067a81cb13
2 changed files with 2 additions and 6 deletions
  1. BIN
      .start.swp
  2. 2 6
      start

BIN
.start.swp


+ 2 - 6
start

@@ -29,12 +29,7 @@ sub_sync(){
     git pull
     if [ ! -z "$1" ]; then
         real_path=$(realpath $1)
-        if [[ ! -d $real_path ]]; then
-            echo "$real_path is not a dir!"
-            exit 0
-        fi
         to_copy=${real_path#*$HOME}
-        mkdir -p $(pwd)$to_copy
         cp -R $real_path $(pwd)$to_copy
         rm -rf $real_path
         echo "${to_copy/\//}" >> ../to_sync
@@ -42,7 +37,8 @@ sub_sync(){
     cd ..
     git add .
     if git commit -am "$(date)"; then
-        git push
+        git remote add origin $repo || true
+        git push -u origin master
     fi
 
     while read p; do