diff options
author | Daniel Friesel <derf@finalrewind.org> | 2010-10-18 18:54:47 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2010-10-18 18:54:47 +0200 |
commit | cc14672d25ec814d2db41e9b3a9376d1e2e57cd9 (patch) | |
tree | 9b2bfd43e3bb83b3cf89280feadaa02a68c6f50f /bin/ct | |
parent | 80dff8aecba5360e126123c87c4bbf318045ddc6 (diff) |
make "ct new <package> <files>" also work for existing packages
Diffstat (limited to 'bin/ct')
-rwxr-xr-x | bin/ct | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -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 ${*}; { |