aboutsummaryrefslogtreecommitdiff
path: root/contrib/kiss-fork
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2020-03-13 13:43:53 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2020-03-13 13:43:53 +0000
commit86591b4ecacf708107220861168944124bcf8d93 (patch)
treeac0ddd2306293d7e1790b3cdf791b9047f59787a /contrib/kiss-fork
parentcd371f92d29e5985ed9918aaa2d6140b4ce27b47 (diff)
downloadcpt-86591b4ecacf708107220861168944124bcf8d93.tar.gz
contrib: Added kiss-[fork,link]
FossilOrigin-Name: ac16762d076744841d4162ba4c4d99fd0ae6836afd90169d6cb25404e5297601
Diffstat (limited to 'contrib/kiss-fork')
-rwxr-xr-xcontrib/kiss-fork17
1 files changed, 17 insertions, 0 deletions
diff --git a/contrib/kiss-fork b/contrib/kiss-fork
new file mode 100755
index 0000000..6e1245c
--- /dev/null
+++ b/contrib/kiss-fork
@@ -0,0 +1,17 @@
+#!/bin/sh -ef
+
+kiss s "${1:-null}" >/dev/null || {
+ printf 'usage: kiss-fork pkg_name\n'
+ exit 1
+}
+
+# Disable this warning as globbing is disabled and word splitting
+# is intentional. This grabs the location of the package's files.
+# shellcheck disable=2046
+(
+ set -- $(kiss s "$1")
+
+ cp -r "$1" .
+)
+
+printf 'forked package to %s\n' "$PWD/$1"