From e19d5f6dcf822ed2b72a9f850799ae0bf22a20e3 Mon Sep 17 00:00:00 2001 From: borutr Date: Sun, 15 Mar 2009 13:30:34 +0000 Subject: [PATCH] sdcc: * support/scripts/repack_release.sh: added sdcc-web: * index.php: added News - sdcc 2.9.0 RC2, removed old sdcc 2.8.0 release news * previous.php: added old news git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@5416 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 4 ++ support/scripts/repack_release.sh | 61 +++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100755 support/scripts/repack_release.sh diff --git a/ChangeLog b/ChangeLog index 108ace48..ebb54877 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-03-15 Borut Razem + + * support/scripts/repack_release.sh: added + 2009-03-13 Borut Razem * doc/sdccman.lyx: "freeware" replaced with "free open source" diff --git a/support/scripts/repack_release.sh b/support/scripts/repack_release.sh new file mode 100755 index 00000000..f31f29b4 --- /dev/null +++ b/support/scripts/repack_release.sh @@ -0,0 +1,61 @@ +# +# repack_release.sh +# +# This script repacks sdcc Linux and Mac OS X snapshot build binary abd doc packages +# into a sdcc release package. +# +# Repacking Linux package example: +# ./repack_release.sh sdcc-snapshot-i386-unknown-linux2.5-20090314-5413.tar.bz2 sdcc-doc-20090314-5413.tar.bz2 2.9.0 +# +# Repacking MacOS X package example: +# ./repack_release.sh sdcc-snapshot-universal-apple-macosx-20090314-5413.tar.bz2 sdcc-doc-20090314-5413.tar.bz2 2.9.0 +# + + +function fatal_error() +{ + echo "repack_release: $1" 1>&2 + exit 1; +} + + +function usage() +{ + echo "Usage: repack_release.sh " 1>&2 + exit 1; +} + + +{ + if [ $# != 3 ] + then + usage + fi + + bin_pkg=$1 + doc_pkg=$2 + ver=$3 + + arch=$(expr $bin_pkg : 'sdcc-snapshot-\([^-]*-[^-]*-[^-]*\)-.*\.tar\.bz2') + if [ -z "$arch" ] + then + fatal_error "$bin_pkg is not a sdcc binary package!" + fi + + if [ -d sdcc ] + then + fatal_error "Directory sdcc already exists!" + fi + + tar -xjvf $bin_pkg || fatal_error "Can't unpack $bin_pkg!" + + rm -rf ./sdcc/share/doc + rm -rf ./sdcc/share/sdcc/doc + tar -xjvf $doc_pkg -C ./sdcc/share/sdcc || fatal_error "Can't unpack $doc_pkg!" + cp ./sdcc/share/sdcc/doc/INSTALL.txt ./sdcc + cp ./sdcc/share/sdcc/doc/README.txt ./sdcc + tar -cjvf sdcc-$ver-$arch.tar.bz2 sdcc || fatal_error "Can't pack sdcc-$ver-$arch.tar.bz2!" + mv sdcc $arch + + exit 0 +} -- 2.30.2