summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2011-12-11 23:57:59 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2011-12-11 23:57:59 +0100
commitce2de750f79f0d35840aad8656838d0f4483a4a1 (patch)
tree2771193b15c33ed89e77339e76c5e669d5c23305
parent70bdcc007b9f18e05b1a28c5bf7afbf97e16e79a (diff)
downloadbuildscripts-ce2de750f79f0d35840aad8656838d0f4483a4a1.tar.gz
buildscripts-ce2de750f79f0d35840aad8656838d0f4483a4a1.tar.bz2
buildscripts-ce2de750f79f0d35840aad8656838d0f4483a4a1.zip
allow building from subpaths
-rwxr-xr-xbin/nwt-build-package5
1 files 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