diff options
author | Ben Combee <combee@techwood.org> | 2012-09-27 14:04:58 -0700 |
---|---|---|
committer | Ben Combee <combee@techwood.org> | 2012-09-27 14:04:58 -0700 |
commit | 8630a86c3c8d8886972723803c96b44f44ee77af (patch) | |
tree | b402227e96be1b310e2e24ccc9a271533cb843f0 | |
parent | 5fa032f56ed7973fe42e3b67f87e2174897e772c (diff) | |
parent | 293b48fa16adfdab3dd22d737e2767b684bbeb08 (diff) | |
download | biblez-ng-8630a86c3c8d8886972723803c96b44f44ee77af.tar.gz |
Merge pull request #3 from pulsation/deploy-to-external-directory
Deploy to an external directory
Enyo-DCO-1.0-Signed-off-by: Philippe Sam-Long (psamlong@laposte.net)
Reviewed-By: Ben Combee (ben.combee@palm.com)
-rw-r--r-- | tools/deploy.bat | 12 | ||||
-rwxr-xr-x | tools/deploy.sh | 11 |
2 files changed, 14 insertions, 9 deletions
diff --git a/tools/deploy.bat b/tools/deploy.bat index a685bfa..e6969b0 100644 --- a/tools/deploy.bat +++ b/tools/deploy.bat @@ -22,14 +22,14 @@ REM extract project folder name FOR /D %%I IN ("%SOURCE%\.") DO SET NAME=%%~nxI REM prepare target name -SET DEPLOY=%NAME%%SUFFIX% +IF NOT DEFINED DEPLOY SET DEPLOY=%NAME%%SUFFIX% REM make sure (deploy) FOLDER exists -SET TARGET="%SOURCE%%FOLDER%" -IF NOT EXIST %TARGET% mkdir %TARGET% +SET TARGETROOT="%SOURCE%%FOLDER%" +IF NOT EXIST %TARGETROOT% mkdir %TARGETROOT% REM pull path for this deploy -SET TARGET="%SOURCE%%FOLDER%\%DEPLOY%" +IF NOT DEFINED TARGET SET TARGET="%SOURCE%%FOLDER%\%DEPLOY%" REM quotes around path that might have spaces SET SOURCE="%SOURCE%" @@ -39,7 +39,7 @@ ECHO. IF NOT EXIST %TARGET% GOTO deploy -ECHO "%DEPLOY%" folder already exists, please rename or remove it and try again. +ECHO "%TARGET%" folder already exists, please rename or remove it and try again. ECHO. PAUSE @@ -85,4 +85,4 @@ FOR /D %%G in (%SOURCE%lib\*) DO IF NOT EXIST "%%G\deploy.bat" XCOPY "%%G" %TARG ECHO. -PAUSE
\ No newline at end of file +PAUSE diff --git a/tools/deploy.sh b/tools/deploy.sh index 9901f29..2c20f74 100755 --- a/tools/deploy.sh +++ b/tools/deploy.sh @@ -15,11 +15,16 @@ SOURCE=$(cd `dirname $0`/../; pwd) NAME=${SOURCE##*/} # target names -DEPLOY="$NAME$SUFFIX" -TARGET="$SOURCE/$FOLDER/$DEPLOY" +if [ -z "${DEPLOY}" ]; then + DEPLOY="$NAME$SUFFIX" +fi + +if [ -z "${TARGET}" ]; then + TARGET="$SOURCE/$FOLDER/$DEPLOY" +fi if [ -d $TARGET ]; then - echo "$DEPLOY folder already exists, please rename or remove it and try again." + echo "$TARGET folder already exists, please rename or remove it and try again." exit 1 fi |