Bläddra i källkod

Added orgwatch to automat git commit of org files

George Jones 6 månader sedan
förälder
incheckning
ead7c2918a
2 ändrade filer med 9 tillägg och 8 borttagningar
  1. 8 8
      bin/autocommit.sh
  2. 1 0
      bin/orgwatch.sh

+ 8 - 8
bin/autocommit.sh

@@ -33,18 +33,18 @@ else
     git init .
 fi
 
-# Add all org files
-info adding all .org files
-git add *.org
-
-# get rid of anytthing that's not an .org file
-git clean -f
-
 # Git commit changes if any
 if [[ $(git status --porcelain) ]]; then
     # Changes exist, so commit them
+    info files to be added:
+    git ls-files -o *.org
     info files changed:
-    git ls-files -m
+    git ls-files -m *.org
+    # Add all org files
+    info adding all .org files
+    git add *.org
+    # # get rid of anytthing that's not an .org file
+    # git clean -f
     git commit -am "Autocommit `date`"
     info "Changes committed."
 else

+ 1 - 0
bin/orgwatch.sh

@@ -4,6 +4,7 @@
 # This should be run out of cron periodically
 #
 
+echo
 echo "--- Orgwatch `date` ---"
 /home/gmj/bin/orglinks.sh
 /home/gmj/bin/autocommit.sh