aboutsummaryrefslogtreecommitdiff
path: root/contrib/cpt-new
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2021-02-04 10:11:35 +0000
committermerakor <cem@ckyln.com>2021-02-04 10:11:35 +0000
commit63c4051197cfcad2231de6eb9874055d668f47df (patch)
tree53d3b3e340570e1dda7d763a5071bafe0ad56543 /contrib/cpt-new
parent37d93c5413b1025c8490b57edf2dea821320d2ca (diff)
parent8d5398a76eda8beec3e7458a1400b9a363afce3d (diff)
downloadcpt-63c4051197cfcad2231de6eb9874055d668f47df.tar.gz
Merge branch 'shellspec'
FossilOrigin-Name: 9f02ac446d6b0e692389a85882df0ff8b2ac54ea40c0f040c5c4dd1713456a21
Diffstat (limited to 'contrib/cpt-new')
-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