]> git.donarmstrong.com Git - bin.git/commitdiff
Merge branch 'master' of git+ssh://git.donarmstrong.com/srv/git/bin
authorDon Armstrong <don@donarmstrong.com>
Tue, 16 Dec 2014 00:00:03 +0000 (16:00 -0800)
committerDon Armstrong <don@donarmstrong.com>
Tue, 16 Dec 2014 00:00:03 +0000 (16:00 -0800)
sanitize_filename
update_mobile_org
update_org_ical

index a6dc4c10038315e89ad59dc81d78926dfd32bdc8..e56e3451b12169a0352ad0bb01ba4fc98cef8cc0 100755 (executable)
@@ -14,18 +14,13 @@ while [ $1 != "--" ]; do
        --anime)
            ANIME_CUT=1
            ;;
-       --restart)
-           RESTART=1
-           ;;
-       --force)
-           FORCE=1
-           ;;
     esac;
     shift
 done;
 shift;
+set -x
 if [ "$ANIME_CUT" == 0 ]; then
-    rename 's/\s+/\_/g; s{[^\w\d.\/]}{\_}g; s/_$//g; $_ = lc($_); s/\_+/\_/g; s/\_\././; s/^_+//g; s/_+$//g;' -- "$@"
+    rename 's/\s+/\_/g; s{[^\w\d.\/]}{\_}g; s/_$//g; $_ = lc($_); s/\_+/\_/g; s/\_\././; s/^_+//g; s/_+$//g;' "$@"
 else
-    rename 's{\[[^\]\/]+\]}{}g; s{\([^\)\/]+\)}{}g; s/\s+/\_/g; $_ = lc($_); s/[_-]+/\_/g; s/\_\././; s/^_+//; s/_+$//g;' -- "$@"
-fi;
\ No newline at end of file
+    rename 's{\[[^\]\/]+\]}{}g; s{\([^\)\/]+\)}{}g; s/\s+/\_/g; $_ = lc($_); s/[_-]+/\_/g; s/\_\././; s/^_+//; s/_+$//g;' "$@"
+fi;
index e59e6ba1571a632b1f248b531b39ab174fde53db..f1c98e87f31def9fe221b097278b7f7aa78c543a 100755 (executable)
@@ -8,7 +8,7 @@ if [ -n "$PS1" ]; then
     LOCKOPTS=-f;
 fi;
 mr -d ~/org-mode up;
-with-lock-ex $LOCKOPTS $TMPDIR/update_mobile_org emacsclient -n -e '(org-save-all-org-buffers)' >/dev/null 2>&1
-yes|with-lock-ex $LOCKOPTS $TMPDIR/update_mobile_org emacs --batch -l ~/.emacs \
+with-lock-ex $LOCKOPTS $TMPDIR/update_mobile_org timeout -k1m 1m emacsclient -n -e '(org-save-all-org-buffers)' >/dev/null 2>&1
+yes|with-lock-ex $LOCKOPTS $TMPDIR/update_mobile_org timeout -k1m 5m emacs --batch -l ~/.emacs \
     --eval '(org-mobile-push)' --eval '(org-mobile-pull)' --eval '(org-save-all-org-buffers)';
 mr -d ~/org-mode commit -m'org mobile automated commit and push';
index 0d5422e513d88acf39f302a04099b25c16108334..84b57a79ec22100387a7b15d851919c50ad56399 100755 (executable)
@@ -7,12 +7,12 @@ LOCKOPTS=-q
 if [ -n "$PS1" ]; then
     LOCKOPTS=-f;
 fi;
-with-lock-ex $LOCKOPTS $TMPDIR/update_org_ical emacsclient -n -e '(org-save-all-org-buffers)' >/dev/null 2>&1
-yes|with-lock-ex $LOCKOPTS $TMPDIR/update_org_ical emacs --batch -l ~/.emacs \
+with-lock-ex $LOCKOPTS $TMPDIR/update_org_ical timeout -k1m 1m emacsclient -n -e '(org-save-all-org-buffers)' >/dev/null 2>&1
+yes|with-lock-ex $LOCKOPTS $TMPDIR/update_org_ical timeout -k1m 3m emacs --batch -l ~/.emacs \
     --eval '(setq org-icalendar-combined-description "Don Armstrong’s Calendar (org-mode)")' \
     --eval '(setq org-icalendar-combined-name "Don Armstrong (org-mode)")' \
     --eval "(setq org-icalendar-combined-agenda-file \"$TMPDIR/org.ics\")" \
     --eval "(setq org-icalendar-exclude-tags '( \"habit\" ) )" \
     --eval '(org-icalendar-combine-agenda-files)' \
     --eval '(org-save-all-org-buffers)';
-with-lock-ex $LOCKOPTS $TMPDIR/update_org_ical rsync -av "$TMPDIR/org.ics" rzlab.ucr.edu:debian/.google_ical*/org.ics
+with-lock-ex $LOCKOPTS $TMPDIR/update_org_ical timeout -k1m 1m rsync -av "$TMPDIR/org.ics" rzlab.ucr.edu:debian/.google_ical*/org.ics