]> git.plutz.net Git - invoices/blobdiff - invoices.sh
support for git versioning of data
[invoices] / invoices.sh
index 93292cbee74a31f0b69613940c8a4bc72b215712..c21fe4fe3b597c8cf42b31ca570d1813ea653498 100755 (executable)
@@ -238,6 +238,11 @@ update_invoice(){
         | grep -xvF 'time=     work=   hours=0'
       done
     } >"invoices/$id"
+
+    [ -d .git ] && {
+      git add "invoices/$id"
+      git commit -m 'Update invoice info for "'"$(POST number)"'"' -- "invoices/$id"
+    } >/dev/null
   fi
   if [ "$(POST genpdf)" ]; then
     read -r sender client date x<"invoices/$id"