Author: pescetti Date: Tue Sep 20 21:27:42 2016 New Revision: 1761641 URL: http://svn.apache.org/viewvc?rev=1761641&view=rev Log: Add a script for preparing the download tree after building.
Added: openoffice/devtools/build-scripts/4.1.3/ openoffice/devtools/build-scripts/4.1.3/prepare-download-tree.sh (with props) Added: openoffice/devtools/build-scripts/4.1.3/prepare-download-tree.sh URL: http://svn.apache.org/viewvc/openoffice/devtools/build-scripts/4.1.3/prepare-download-tree.sh?rev=1761641&view=auto ============================================================================== --- openoffice/devtools/build-scripts/4.1.3/prepare-download-tree.sh (added) +++ openoffice/devtools/build-scripts/4.1.3/prepare-download-tree.sh Tue Sep 20 21:27:42 2016 @@ -0,0 +1,43 @@ +#!/bin/bash +# Prepare the OpenOffice download tree: after build, move and sign files. +# Options are passed on to gpg: +# - You can run with '--batch --passphrase MY_PASSPHRASE' to avoid old versions of gpg prompting for password - Don't use on a multi-user system. +# - Use gpg-agent on newer systems. + +if [ ! -d 'main' ] ; then + echo "Run from the root of an OpenOffice build tree (the one containing the 'main' directory)." + exit 1 +fi +# TODO: Extend to cover other platforms; this is for Linux-64 only. +PLATFORM="unxlngx6.pro" +PRODUCT="Apache_OpenOffice" +DESTINATION="../binaries" +# For future use. +# FORMATS=`ls -1 main/instsetoo_native/$PLATFORM/$PRODUCT` + +# Move all packages to the appropriate location in ../binaries +PACKAGES=`ls -1 main/instsetoo_native/unxlngx6.pro/Apache_OpenOffice/*/install/*/*.tar.gz` || echo "Warning: no packages found." +for PACKAGE in $PACKAGES; do + LANGUAGE=`echo "$PACKAGE" | sed s!main/instsetoo_native/$PLATFORM/$PRODUCT/[^/]*/install/!! | sed s!_download.*!!` + FILENAME=`basename $PACKAGE` + OUTPUT_DIR="$DESTINATION/$LANGUAGE/" + # For future use. + # FORMAT=`echo $PACKAGE | sed s!main/instsetoo_native/$PLATFORM/$PRODUCT/!! | sed s!/.*!!` + mkdir -p "$OUTPUT_DIR" + mv "$PACKAGE" "$OUTPUT_DIR" +done + +# Add hashes/signatures. +cd "$DESTINATION" +FILES=`find . -type f -name '*.tar.gz'` +for FILE in $FILES; do + FILENAME=`basename "$FILE"` + pushd `dirname "$FILE"` + md5sum "$FILENAME" > "$FILENAME.md5" + sha256sum --binary "$FILENAME" > "$FILENAME.sha256" + # The gpg execution will fail if the file already exists. + rm -f "$FILENAME.asc" + # Any command-line options are passed on to gpg. + gpg $* --armor --output "$FILENAME.asc" --detach-sig "$FILENAME" + popd +done Propchange: openoffice/devtools/build-scripts/4.1.3/prepare-download-tree.sh ------------------------------------------------------------------------------ svn:executable = *