Mercurial > hg > forks > UniversalIndentGUI
changeset 602:485d9e1e49cb
Changed the universal build script to have an optioen "--rebuild". If this one is set, the release dir will be deleted to completely rebuild the project. Otherwise only changed files will be compiled.
git-svn-id: svn://svn.code.sf.net/p/universalindent/code/trunk@852 59b1889a-e5ac-428c-b0c7-476e01d41282
author | thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282> |
---|---|
date | Mon, 20 Oct 2008 14:13:54 +0000 |
parents | 0166150e6366 |
children | e65eb4ddc0f8 |
files | buildRelease.sh |
diffstat | 1 files changed, 28 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/buildRelease.sh Mon Oct 20 11:39:55 2008 +0000 +++ b/buildRelease.sh Mon Oct 20 14:13:54 2008 +0000 @@ -1,10 +1,13 @@ #!/bin/sh # Command line syntax: -# buildRelease [targetsystem qtdir] +# buildRelease [targetsystem qtdir] [--rebuild] # Example: # buildRelease win32 /c/qt.4.3.2 # Default values are targetsystem=src, qtdir="" +# if "--rebuild" is set the release directory + +#TODO: Parse all input parameters to enable a flexible syntax. # 1. param is target system if [ -n "$1" ]; then @@ -18,6 +21,13 @@ QTDIR=$2 fi +# 3. param is for setting "complete rebuild" to true +if [ -n "$3" ] && [ "$3" = "--rebuild" ]; then + COMPLETEREBUILD="true"; +else + COMPLETEREBUILD="false"; +fi + # Only allow the build targets win32, macx and linux. if [ -n "$1" ] && [ ! "$1" = "win32" ] && [ ! "$1" = "macx" ] && [ ! "$1" = "linux" ] && [ ! "$1" = "src" ]; then echo "ERROR: Build target \"$1\" not supported! Supported are win32, macx, linux and src." @@ -39,6 +49,7 @@ # Configuration # ------------- +#TODO: get version from source code file. version=1.0.1 doSVNUpdate=false @@ -50,10 +61,15 @@ fi # Set QTDIR for each platform if not given as command line parameter. +#TODO: Check whether QTDIR is valid and qmake can be executed if QTDIR hasn't been set via command line. if [ "$targetSystem" = "win32" ] && [ ! -n "$2" ]; then + echo "The QTDIR has not been set via command line parameter!" + exit 1 QTDIR=/f/Qt/qt.4.4.3_gpl_static else if [ "$targetSystem" = "macx" ] && [ ! -n "$2" ]; then + echo "The QTDIR has not been set via command line parameter!" + exit 1 QTDIR=/Users/thomas/Documents/Informatik/qt-static-release fi fi @@ -233,18 +249,17 @@ else ###################### binary release begin ######################## -echo "Cleaning up release dirs" -echo "------------------------" -if [ -d "release" ]; then +if [ -d "release" ] && [ "$COMPLETEREBUILD" = "true" ]; then + echo "Cleaning up release dirs" + echo "------------------------" rm -r release &> /dev/null + if [ $? -gt 0 ]; then + echo "ERROR: Could not delete release dir!" + exit 1 + fi + echo "Done" + echo "" fi -if [ $? -gt 0 ]; then - echo "ERROR: Could not delete release dir!" - exit 1 -fi -echo "Done" -echo "" - echo "Calling qmake" echo "-------------" @@ -290,7 +305,7 @@ indenters="astyle$ext astyle.html uncrustify$ext uncrustify.txt xmlindent$ext xmlindent.txt" # For win32 and Linux add some indenters that do not run or exist under MaxOSX if [ "$targetSystem" = "win32" ] || [ "$targetSystem" = "linux" ]; then - indenters="$indenters bcpp$ext bcpp.txt csstidy$ext greatcode.exe greatcode.txt htb.exe htb.html indent$ext indent.html tidy$ext tidy.html xmlindent$ext xmlindent.html" + indenters="$indenters bcpp$ext bcpp.txt csstidy$ext greatcode.exe greatcode.txt htb.exe htb.html indent$ext indent.html tidy$ext tidy.html" fi @@ -331,7 +346,7 @@ echo "Copying the script based indenters to the target indenters dir" echo "--------------------------------------------------------------" -indenters="hindent hindent.html JsDecoder.js perltidy PerlTidyLib.pm php_beautifier.html phpStylist.php phpStylist.txt rbeautify.rb ruby_formatter.rb shellindent.awk" +indenters="hindent hindent.html JsDecoder.js perltidy PerlTidyLib.pm php_beautifier.html phpStylist.php phpStylist.txt pindent.py pindent.txt rbeautify.rb ruby_formatter.rb shellindent.awk" for i in $indenters do cp ./indenters/$i ./$targetDir/indenters/ &> /dev/null