summaryrefslogtreecommitdiff
path: root/add_common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'add_common.sh')
-rw-r--r--add_common.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/add_common.sh b/add_common.sh
new file mode 100644
index 0000000..c806b11
--- /dev/null
+++ b/add_common.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+eof="$(echo EOF_$1 | tr '.[[:lower:]]' '_[[:upper:]]')"
+
+printf '%s() {\n' "$(echo $1 | tr . _)"
+printf 'uudecode -o- << %s\n' $eof
+uuencode -m $1 < $1
+printf '%s\n}\n\n' $eof