From c5f307a330c141c955d4bc99f4675d816b28e223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 13 Oct 2017 13:44:11 +0200 Subject: Some update --- utils | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 utils (limited to 'utils') 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 +} -- cgit v1.2.3