bunch of new stuff, a few fixes
[distro-setup] / auto-commit-changes
1 #!/bin/bash
2
3 commit() {
4 if ! git diff --quiet || ! git diff --cached --quiet; then
5 # even with -q, it emits a newline into stderr
6 git commit -qam autocommit 2>/dev/null
7 fi
8 }
9
10
11
12 if [[ $1 ]]; then
13 for dir; do
14 cd $dir
15 commit
16 done
17 else
18 commit
19 fi