X-Git-Url: https://git.plutz.net/?p=invoices;a=blobdiff_plain;f=clients.sh;fp=clients.sh;h=8e6713c4bf5c4753dcb7768d0a21fa5356a81481;hp=474f6258538189525f60dea9dff0d2eb40f96301;hb=2be8dad1ce4b7b9915488511f5c43a1ad7788f8f;hpb=95445a19d5a6dc3133a3e539e1c012425149a401 diff --git a/clients.sh b/clients.sh index 474f625..8e6713c 100755 --- a/clients.sh +++ b/clients.sh @@ -45,6 +45,12 @@ update_client(){ printf 'address=%s hourly=%s' \ "$(POST address |STRING)" "$(POST hourly |STRING)" \ >"clients/$id" + + [ -d .git ] && { + git add "clients/$id" + git commit -m 'Update client info for "'"$(POST address |sed 1q)"'"' -- "clients/$id" + } >/dev/null + REDIRECT "/clients/" else error Invalid Data "$id" "$(POST update)"