diff --git a/README.md b/README.md index 38ff65d..4895767 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ brew install coreutils ## What it does When you start the script, it prepares some variables and checks if the file -[a] or directory [b] given as input really exists. +or directory given as input really exists. Then it goes into the main loop (which will run forever, until the script is forcefully stopped/killed), which will: @@ -111,13 +111,14 @@ forcefully stopped/killed), which will: * watch for changes to the file/directory using `inotifywait` (`inotifywait` will block until something happens) * wait 2 seconds -* `cd` into the directory [b] / the directory containing the file [a] - \(because `git` likes to operate locally) -* `git add `[a] / `git add .`[b] -* `git commit -m "Scripted auto-commit on change ()"`[a] / `git commit - - -a -m"Scripted auto-commit on change ()"`[b] - +* case file: + * `cd` into the directory containing the file (because `git` likes to operate locally) + * `git add ` + * `git commit -m "Scripted auto-commit on change ()"` +* case directory: + * `cd` into the directory (because `git` likes to operate locally) + * `git add --all .` + * `git commit -m "Scripted auto-commit on change ()"` * if a remote is defined (with `-r`) do a push after the commit (a specific branch can be selected with `-b`)