summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ct16
1 files changed, 9 insertions, 7 deletions
diff --git a/bin/ct b/bin/ct
index 79f37d0..f5f7100 100755
--- a/bin/ct
+++ b/bin/ct
@@ -867,19 +867,21 @@ function pkg_new {
shift
- if list_exists ${package}; then
+ if list_exists ${package} && [[ ${#} == 0 ]] ; then
die "We already have a package with this name: ${package}\n"
fi
pkgroot_setup ${PKG_ROOTS[1]}
- info "Creating local package...\n"
- vcs_new ${package}
+ if ! list_exists ${package}; then
+ info "Creating local package...\n"
+ vcs_new ${package}
- if [[ ${PKG_PROTO} == ssh ]] {
- info "Creating remote package...\n"
- ssh ${PKG_UAH} "GIT_DIR=${PKG_PATH}/${package} git --bare init"
- }
+ if [[ ${PKG_PROTO} == ssh ]] {
+ info "Creating remote package...\n"
+ ssh ${PKG_UAH} "GIT_DIR=${PKG_PATH}/${package} git --bare init"
+ }
+ fi
for file in ${*}; {