diff options
author | merakor <cem@ckyln.com> | 2020-06-03 15:37:58 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2020-06-03 15:37:58 +0000 |
commit | 94a97fa916b92eab2bce214b48551aa8c19e21c0 (patch) | |
tree | 939ff4d6e7b970a20e5a7a2eac3642121b5acace /doc | |
parent | cc90d7acebcdbf34a1e075f3489e0a3e267e5aee (diff) | |
download | cpt-94a97fa916b92eab2bce214b48551aa8c19e21c0.tar.gz |
doc: change kinstall
FossilOrigin-Name: dc5b9008f0dc0ea842c26ffe5aad42164f009ed547ef5e0150f7e2c02f5876f9
Diffstat (limited to 'doc')
-rw-r--r-- | doc/functions.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/functions.txt b/doc/functions.txt index 0f8cd60..3a0cd7b 100644 --- a/doc/functions.txt +++ b/doc/functions.txt @@ -79,12 +79,12 @@ single file where it will be named as the argument. kinstall() { - # usage: kinstall 755 /usr/bin/file filename - ! [ -d "$2" ] || { + # usage: kinstall 755 filename /usr/bin/file + ! [ -d "$3" ] || { printf '%s\n' "Error: $target is a directory" >&2 return 1 } - mkdir -p "${2%/*}"; cp "$3" "$2" - chmod "$1" "$2" + mkdir -p "${3%/*}"; cp "$2" "$3" + chmod "$1" "$3" } |