diff options
author | con <qtc-committer@nokia.com> | 2010-06-21 12:56:23 +0200 |
---|---|---|
committer | con <qtc-committer@nokia.com> | 2010-06-21 12:56:23 +0200 |
commit | ea2aedded9f7c2af64a2c50dd965a75dab6cca3e (patch) | |
tree | 16220d999f6627d3c2c3bbf71693ac73352e4188 /scripts | |
parent | 2a6f1df1687289ee6c9a5bef5832c316ed9632e8 (diff) |
Add little script that creates source and doc package.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/createSrcAndDocPackage.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/scripts/createSrcAndDocPackage.sh b/scripts/createSrcAndDocPackage.sh new file mode 100755 index 0000000000..d27110fa41 --- /dev/null +++ b/scripts/createSrcAndDocPackage.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +## Command line parameters +if [[ $# != 1 ]]; then + cat <<USAGE +usage: + $0 <branch> + + Creates tar and zip source package from origin/<branch> and documentation-zip from current checkout. + Files and directories are named after <branch>. + example: + $0 2.0.0 +USAGE + exit 1 +fi + + +VERSION=$1 +cd `dirname $0`/.. +echo "Creating tar archive..." +git archive --format=tar --prefix=qt-creator-${VERSION}-src/ origin/${VERSION} | gzip > qt-creator-${VERSION}-src.tar.gz || exit 1 +echo "Creating zip archive..." +git archive --format=zip --prefix=qt-creator-${VERSION}-src/ origin/${VERSION} > qt-creator-${VERSION}-src.zip || exit 1 +echo "Creating documentation..." +rm -r doc/html +qmake -r && make docs || exit 1 +cd doc +cp -r html qt-creator-${VERSION} +zip -r ../qt-creator-${VERSION}-doc.zip qt-creator-${VERSION} +rm -r qt-creator-${VERSION} |