aboutsummaryrefslogtreecommitdiff
path: root/contrib/kiss-fork
diff options
context:
space:
mode:
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"