aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-10-13 13:44:11 +0200
committerKarel Kočí <cynerd@email.cz>2017-10-13 13:44:11 +0200
commitc5f307a330c141c955d4bc99f4675d816b28e223 (patch)
tree35f76c615cdd9c1349e52e198dd330edd4051298 /utils
parent496fad1b1059118900d8450ce400330c65116497 (diff)
downloadmulticonfig-c5f307a330c141c955d4bc99f4675d816b28e223.tar.gz
multiconfig-c5f307a330c141c955d4bc99f4675d816b28e223.tar.bz2
multiconfig-c5f307a330c141c955d4bc99f4675d816b28e223.zip
Some update
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
+}