aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2021-01-05 13:50:59 +0000
committermerakor <cem@ckyln.com>2021-01-05 13:50:59 +0000
commit80b1d3cc06ac5a57fd9b5366c1ab018ced4b9c31 (patch)
treef552793d9903b1535cace3d31dd2426243d07177
parentbd53fedc904f1077a3f1f364d4ec7cafe4b20825 (diff)
downloadcpt-80b1d3cc06ac5a57fd9b5366c1ab018ced4b9c31.tar.gz
cpt-new: minor changes
FossilOrigin-Name: 5e00f38854a6d7867dec2ad81e15666976a4fad2e405292e02e1aec5baf7bdb1
-rwxr-xr-xcontrib/cpt-new6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/cpt-new b/contrib/cpt-new
index 00b99c2..b5eac9c 100755
--- a/contrib/cpt-new
+++ b/contrib/cpt-new
@@ -1,10 +1,10 @@
#!/bin/sh -e
# Create a boilerplate CPT package
-out() { printf '\033[1;33m-> \033[m%s\n' "$@" >&2 ;}
+out() { printf '%s\n' "$@" ;}
die() { printf '\033[1;31m!> \033[m%s\n' "$@" >&2 ; exit 1 ;}
-case "$1" in ''|--help|-h) out "usage: ${0##*/} [name] [version] [source]"; exit 0; esac
+case "$1" in ''|--help|-h) out "usage: ${0##*/} [pkg] [version] [source]"; exit 0; esac
[ -d "$1" ] && die "Package '$1' already exists."
@@ -20,4 +20,4 @@ printf '%s\n' "$2 1" > "$1/version"
# Create the sources file
printf '%s\n' "$3" > "$1/sources"
-out "Package '$1' created to '$PWD/$1'"
+out "Package '${1##*/}' created to '$PWD/$1'" >&2