summaryrefslogtreecommitdiffhomepage
path: root/make-tar.sh
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-10-01 07:56:47 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-10-01 07:57:35 +0200
commit355ac9296f00eac6dca51fd183f2a0b742729810 (patch)
treee62c344905e81977234255cf1bd8109857697575 /make-tar.sh
parente1d3df8a07177ae04948dc6e9b7c4d2af7972b5f (diff)
add tarball target
Diffstat (limited to 'make-tar.sh')
-rw-r--r--make-tar.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/make-tar.sh b/make-tar.sh
new file mode 100644
index 00000000..26b65dcb
--- /dev/null
+++ b/make-tar.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+prefix="$1"
+filename="$2"
+
+if : &&
+ make install &&
+ cd $(dirname -- "${prefix}") &&
+ tar Jcf "${filename}" $(basename "${prefix}")
+then
+ ls -lh -- "${filename}"
+else
+ rm -fv -- "${filename}"
+ exit 1
+fi
+
+exit 0