sdcc:
authorborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 15 Mar 2009 13:30:34 +0000 (13:30 +0000)
committerborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 15 Mar 2009 13:30:34 +0000 (13:30 +0000)
* 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
support/scripts/repack_release.sh [new file with mode: 0755]

index 108ace48b968939387428bea780bda3ae735d74c..ebb54877f6e72e9896b9f4c8a84b6d967420265c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-03-15 Borut Razem <borut.razem AT siol.net>
+
+       * support/scripts/repack_release.sh: added
+
 2009-03-13 Borut Razem <borut.razem AT siol.net>
 
        * 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 (executable)
index 0000000..f31f29b
--- /dev/null
@@ -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 <bin_package> <doc_package> <version>" 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
+}