forked from kiss-community/kiss
6786d2ca0a
Seeing as how these utilities are now better integrated, more effort should go into the overall interface between what should be the "benchmark" or example kiss scripts.
21 lines
509 B
Bash
Executable File
21 lines
509 B
Bash
Executable File
#!/bin/sh -ef
|
|
# Copy a package's repository files into the current directory.
|
|
|
|
# Ignore shellcheck as we want the warning's behavior.
|
|
# shellcheck disable=2015
|
|
[ "$1" ] && kiss s "${1:-null}" >/dev/null || {
|
|
printf 'usage: kiss-fork [pkg]\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"
|