Don't have these scripts in our local copy.
This commit is contained in:
parent
04ae87ca9a
commit
6ca9910248
|
@ -1,68 +0,0 @@
|
|||
#!/bin/bash
|
||||
# @P@/scripts/functions.sh
|
||||
#
|
||||
# (c)2006, @AUTHOR@, <@EMAIL@>.
|
||||
# Released under the GNU GPLv2. See file COPYING or
|
||||
# http://www.gnu.org/copyleft/gpl.html for details.
|
||||
#
|
||||
|
||||
# Common functions
|
||||
|
||||
|
||||
|
||||
# Print a success message
|
||||
print_success() {
|
||||
if [ -z "${TERM}" -o "${TERM}" == "dumb" ]
|
||||
then
|
||||
echo -n " - "
|
||||
else
|
||||
(echo -n -e " \E[32m* "; tput sgr0)
|
||||
fi
|
||||
echo $*
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Print a failure message
|
||||
print_failure() {
|
||||
if [ -z "${TERM}" -o "${TERM}" == "dumb" ]
|
||||
then
|
||||
echo -n " *** "
|
||||
else
|
||||
(echo -n -e " \E[31m*** "; tput sgr0)
|
||||
fi
|
||||
echo $*
|
||||
}
|
||||
|
||||
|
||||
|
||||
# This function carries out a command, but reports its failure if
|
||||
# necessary.
|
||||
do_cmd() {
|
||||
[ "${VERBOSE}" != "0" ] && echo "$@"
|
||||
"$@"
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
print_failure "'$@' failed."
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
# This function carries out a command, but reports its failure if
|
||||
# necessary.
|
||||
do_cmd_redir() {
|
||||
DEST=$1
|
||||
shift
|
||||
[ "${VERBOSE}" != "0" ] && echo "$@ >> ${DEST}"
|
||||
"$@" >> ${DEST}
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
print_failure "'$@' failed."
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
|
||||
# vim: expandtab:ts=4:sw=4
|
|
@ -1,80 +0,0 @@
|
|||
#!/bin/bash
|
||||
# @P@/scripts/release.sh
|
||||
#
|
||||
# (c)2006, @AUTHOR@, <@EMAIL@>.
|
||||
# Released under the GNU GPLv2. See file COPYING or
|
||||
# http://www.gnu.org/copyleft/gpl.html for details.
|
||||
#
|
||||
|
||||
# Prepares package for release. Expects the version number on the
|
||||
# command line.
|
||||
|
||||
|
||||
|
||||
# Get the directory of the repository (needed to include functions file)
|
||||
cd "$(dirname $0)"
|
||||
REPOS=$(dirname "$(pwd)")
|
||||
[ -z "${VERBOSE}" ] && VERBOSE=0
|
||||
source "${REPOS}/scripts/functions.sh" || exit 1
|
||||
|
||||
|
||||
|
||||
# Get version etc.
|
||||
if [ $# -ne 2 ]
|
||||
then
|
||||
echo "Usage: scripts/release.sh <version> <output_dir>"
|
||||
exit 1
|
||||
fi
|
||||
VER=$1
|
||||
DIR=$2
|
||||
|
||||
PKGNAME="@P@-${VER}"
|
||||
|
||||
|
||||
|
||||
# move to output directory and clone git repository
|
||||
echo "Cloning repository..."
|
||||
do_cmd cd "${DIR}" || exit 1
|
||||
do_cmd rm -rf "${PKGNAME}" "${PKGNAME}-doc" || exit 1
|
||||
do_cmd git-clone --local --shared -n "${REPOS}" "${PKGNAME}" || exit 1
|
||||
do_cmd cd "${PKGNAME}" || exit 1
|
||||
print_success "Done"
|
||||
|
||||
|
||||
|
||||
# Check out a new copy of the library from git
|
||||
echo "Checking out tag ${VER}..."
|
||||
do_cmd git-checkout -b releaseprivate "${VER}" || exit 1
|
||||
print_success "Done"
|
||||
|
||||
|
||||
|
||||
# Check that the default build operation runs; also, build and save the
|
||||
# documentation whilst we're at it
|
||||
do_cmd ./make.sh default docs || exit 1
|
||||
do_cmd mv html "../${PKGNAME}-doc" || exit 1
|
||||
|
||||
|
||||
|
||||
# Clean up
|
||||
do_cmd ./make.sh clean || exit 1
|
||||
do_cmd rm -rf .git || exit 1
|
||||
|
||||
|
||||
|
||||
# Build archive, md5sum and signature
|
||||
cd ..
|
||||
tar c "${PKGNAME}" | bzip2 > "${PKGNAME}.tar.bz2"
|
||||
tar c "${PKGNAME}-doc" | bzip2 > "${PKGNAME}-doc.tar.bz2"
|
||||
sha1sum "${PKGNAME}.tar.bz2" > "${PKGNAME}.sha1"
|
||||
sha1sum "${PKGNAME}-doc.tar.bz2" > "${PKGNAME}-doc.sha1"
|
||||
gpg -a -b "${PKGNAME}.tar.bz2"
|
||||
gpg -a -b "${PKGNAME}-doc.tar.bz2"
|
||||
|
||||
|
||||
|
||||
# clean up
|
||||
rm -rf "${PKGNAME}" "${PKGNAME}-doc"
|
||||
|
||||
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
|
||||
# vim: expandtab:ts=4:sw=4
|
Loading…
Reference in New Issue