summaryrefslogtreecommitdiffstats
path: root/redhat/gentarball.sh
diff options
context:
space:
mode:
authoralbator <albator@aria.vtf>2011-09-04 17:04:12 +0200
committeralbator <albator@aria.vtf>2011-09-04 17:04:12 +0200
commit016dd39c2ae7c15ce5b16c992fa1a2dd60d755ca (patch)
tree94d8c98fbf2650fbbf980469a7cf70054147ffb4 /redhat/gentarball.sh
parentdf86c138f55c583cec28278b818236917a75f229 (diff)
downloadtde-packaging-016dd39c2ae7c15ce5b16c992fa1a2dd60d755ca.tar.gz
tde-packaging-016dd39c2ae7c15ce5b16c992fa1a2dd60d755ca.zip
Initial production script for RHEL
Use 'gentarball.sh' to generate tarballs from SVN, then 'genrpm.sh' to build RPM.
Diffstat (limited to 'redhat/gentarball.sh')
-rwxr-xr-xredhat/gentarball.sh60
1 files changed, 60 insertions, 0 deletions
diff --git a/redhat/gentarball.sh b/redhat/gentarball.sh
new file mode 100755
index 000000000..9fd57625f
--- /dev/null
+++ b/redhat/gentarball.sh
@@ -0,0 +1,60 @@
+#!/bin/bash
+
+cd "$( dirname "$0" )"
+
+# Default TDE version (if unspecified in 'components.txt')
+DEFAULT_VERSION="3.5.12.99"
+
+clear
+cat <<EOF
+This script generates a source tarball of TDE from the SVN/GIT repository.
+Please choose a TDE component to archive or build.
+
+EOF
+
+
+##### CHOOSE A TDE COMPONENT #####
+PS3="Enter number: "
+select COMP in $( cut -f1 components.txt ) ; do
+ ARCHIVEDIR="${PWD}/${COMP}"
+ [ -d "${ARCHIVEDIR}" ] || mkdir -p "${ARCHIVEDIR}"
+
+ VERSION=$( awk '{ if ($1 == "'${COMP}'") { print $2; } }' components.txt )
+ if [ -z "${VERSION}" ]; then VERSION=${DEFAULT_VERSION}; fi
+ ARCHIVENAME=${COMP##*/}-${VERSION}.$(date +%Y%m%d).tar.gz
+
+ # List existing tarballs
+ if [ -e ${ARCHIVEDIR}/${COMP##*/}*.tar.gz ]; then
+ echo
+ echo "You currently have the following tarball(s): "
+ for i in ${ARCHIVEDIR}/${COMP##*/}*.tar.gz; do echo " ${i##*/}"; done
+ fi
+
+ echo
+ echo "Press ENTER to download a new version '${ARCHIVENAME}', or CTRL+C to abort."
+ read rep
+
+ TMPDIRTDE=$(mktemp -d)
+ pushd "${TMPDIRTDE}" >/dev/null
+ mkdir -p "${TMPDIRTDE}/${COMP}"
+ pushd "${COMP}/.." >/dev/null
+ echo "Extracting '${COMP}' from SVN ..."
+ case "${COMP##*/}" in
+ "qt3") git clone http://scm.trinitydesktop.org/scm/git/tde; mv tde/main/dependencies/qt3 . ;;
+ *) svn export --force --quiet svn://anonsvn.kde.org/home/kde/branches/trinity/${COMP};;
+ esac
+ popd >/dev/null
+ echo "Creating archive '${ARCHIVENAME}' ..."
+ tar cfz ${ARCHIVEDIR}/${ARCHIVENAME} ${COMP}
+ popd >/dev/null
+ echo "Cleaning temporary directory ..."
+ rm -rf "${TMPDIRTDE}"
+ cat <<EOF
+
+Resulting archive:
+EOF
+ \ls -l ${ARCHIVEDIR}/${ARCHIVENAME}
+ echo
+ echo "Have a nice day !"
+ break
+done