add byte-compile helper
authorJoerg Jaspert <joerg@debian.org>
Sun, 3 Mar 2013 14:26:48 +0000 (15:26 +0100)
committerJoerg Jaspert <joerg@debian.org>
Sun, 3 Mar 2013 14:26:48 +0000 (15:26 +0100)
bin/byte-compile [new file with mode: 0755]

diff --git a/bin/byte-compile b/bin/byte-compile
new file mode 100755 (executable)
index 0000000..f9422b2
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+set -e
+set -u
+set -E
+
+EC=emacsclient
+
+DIR=${1:-"${HOME}/elisp/local"}
+cd ${DIR}
+
+find -type f -name "*.elc" -delete
+
+for file in $(find -type f -name "*.el"); do
+    echo -n "${file} ... "
+    ${EC} --eval "(byte-compile-file \"${file}\")"
+done