aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils29
1 files changed, 29 insertions, 0 deletions
diff --git a/utils b/utils
new file mode 100644
index 0000000..0b94707
--- /dev/null
+++ b/utils
@@ -0,0 +1,29 @@
+# vim: ft=sh
+
+die() {
+ kill $$
+}
+
+inst_f() {
+ if [ -f "$2" ]; then
+ else
+ mkdir "$(basedir "$2")"
+ echo "New file: $1 -> $2"
+ fi
+}
+
+inst_d() {
+ # TODO
+ true
+}
+
+inst() {
+ if [ -f "$1" ]; then
+ inst_f "$1" "$2"
+ elif [ -d "$1" ]; then
+ inst_d "$1" "$2"
+ else
+ echo "Unsupported install target type of: $1"
+ die
+ fi
+}