diff options
author | Daniel Friesel <derf@finalrewind.org> | 2010-10-16 11:09:21 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2010-10-16 11:09:21 +0200 |
commit | 067ac74d5fdbacf1cfdc44623b98b79aa1ad05d2 (patch) | |
tree | b21a41d27f85af1a1a715ac75625f706675858dc /bin | |
parent | baf926f51e3dc736b6af8535b41fe22a479bd032 (diff) |
Finish "ct new"
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ct | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -266,7 +266,15 @@ function vcs_pull ( function vcs_push ( vcs_setup ${1} - git push + + # Repos created with "ct new" don't have a remote tracking branch yet. + # Detect this and fix it. + + if [[ $(git branch -r) == '' ]] { + git push origin master + } else { + git push + } ) function vcs_setup { @@ -853,8 +861,12 @@ function pkg_log { function pkg_new { + if [[ -z ${1} ]] { + die "Usage: ct new <packagename>\n" + } + if list_exists ${1}; then - die "We already have a package with this name: ${1}" + die "We already have a package with this name: ${1}\n" fi pkgroot_setup ${PKG_ROOTS[1]} |