]> git.donarmstrong.com Git - bin.git/blob - update_org_files
include archived files in org updates
[bin.git] / update_org_files
1 #!/bin/bash
2
3 ORG_GREP='-e .org$ -e .org_archive$ -e .org_done$'
4
5 cd ~;
6
7 for a in $(mr list |grep 'list:'|grep -v 'finished'|awk -F'list: ' '{print $2}' 2>/dev/null); do 
8     (cd "$a";
9     if git status --porcelain|grep '^ M'|grep -q $ORG_GREP; then
10           git commit -m'update org files' $(mr --no-recurse status |grep '^ M'|grep $ORG_GREP|sed 's/^ M//g');
11           if [ "$1" != "commit" ]; then
12               git push;
13           fi;
14        fi; 
15     );
16 done;