From ce2de750f79f0d35840aad8656838d0f4483a4a1 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 11 Dec 2011 23:57:59 +0100 Subject: allow building from subpaths --- bin/nwt-build-package | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/nwt-build-package b/bin/nwt-build-package index 071e736..bf87ee0 100755 --- a/bin/nwt-build-package +++ b/bin/nwt-build-package @@ -32,7 +32,8 @@ set_vars() { TEMP_BASE="$HOME/tmp/" # first argv is the name of the Git project - PROJECT=$1 + PROJECT=$(basename $1) + PROJECT_PATH=$1 # grab repository component area from command line (2nd argv) or guess it ARGV2_COMPONENT=$(echo "$2/" | cut -d"/" -f1) @@ -117,7 +118,7 @@ prepare_workspace() { git reset --hard else cd $(dirname $PROJECT_DIR) - git clone git://$GIT_SERVER/$PROJECT.git + git clone git://$GIT_SERVER/$PROJECT_PATH.git cd $PROJECT git checkout --force $CHECKOUT || git checkout --force -b $CHECKOUT; fi -- cgit v1.2.3