summaryrefslogtreecommitdiff
path: root/pcl/tools/make_snapshot.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pcl/tools/make_snapshot.sh')
-rwxr-xr-xpcl/tools/make_snapshot.sh74
1 files changed, 74 insertions, 0 deletions
diff --git a/pcl/tools/make_snapshot.sh b/pcl/tools/make_snapshot.sh
new file mode 100755
index 000000000..e6febc6f6
--- /dev/null
+++ b/pcl/tools/make_snapshot.sh
@@ -0,0 +1,74 @@
+#!/bin/sh
+
+# this is a script makes a snapshot of the ghostpdl/gs trunk and
+# uploads it casper.
+# Note that all the code gets pulled to wherever you run it and then
+# pushed back to casper, so it takes a few minutes.
+
+# It constructs the snapshot from a clean export from the repository,
+# but BASED ON THE REVISIONS IN THE CURRENT CHECKOUT it's run from.
+# A little confusing, but it gives you some control over the version
+# posted. Run 'svn up' first if you want to do the latest.
+
+# this script must be run from the top level of a ghostpdl working copy
+
+# cut off revision numbers for the changelogs
+NEWSREV=8840
+
+# svn urls
+SVNROOT=http://svn.ghostscript.com/ghostscript/trunk
+ghostpdl_SVNROOT=${SVNROOT}/ghostpdl
+gs_SVNROOT=${SVNROOT}/gs
+
+REV=`svn info | grep Revision: | cut -f 2 -d ' '`
+
+CHANGELOG="ghostpdl-r${REV}_NEWS.txt"
+echo "creating changelog... ${CHANGELOG}"
+svn log -r${REV}:${NEWSREV} $ghostpdl_SVNROOT > ${CHANGELOG}
+
+exportdir="ghostpdl-r${REV}"
+if test -d "$exportdir"; then
+ echo "export target directory $exportdir already exists!"
+ exit 1
+fi
+
+echo "creating ${exportdir}.tar.gz ..."
+
+# export the source code
+svn export -q -r ${REV} $ghostpdl_SVNROOT ${exportdir}
+
+# remove proprietary subdirectories that might exist
+echo "removing proprietary code ... "
+for verboten in ufst tools/metro_tests; do
+ if test -d $exportdir/$verboten; then
+ echo " $verboten"
+ rm -rf $exportdir/$verboten
+ fi
+done
+
+# copy in the changelogs
+cp ${CHANGELOG} ${exportdir}
+tar czf $exportdir.tar.gz $exportdir/*
+rm -rf $exportdir
+
+#echo $exportdir.tar.gz ready for upload
+echo "uploading changelogs and $exportdir.tar.gz ..."
+scp ${CHANGELOG} $exportdir.tar.gz \
+ www.ghostscript.com:/www/ghostscript.com/snapshots/
+
+echo "updating links ..."
+echo "cd /www/ghostscript.com/snapshots/ && \
+ if test -w ghostpdl-current.tar.gz; then \
+ rm ghostpdl-current.tar.gz; \
+ ln -s ${exportdir}.tar.gz ghostpdl-current.tar.gz; \
+ fi; \
+ if test -w ghostpdl-current_NEWS.txt; then \
+ rm ghostpdl-current_NEWS.txt; \
+ ln -s ${CHANGELOG} ghostpdl-current_NEWS.txt; \
+ fi;" \
+ # maintain the legacy current tarball link \
+ if test -w ghostpcl-current.tar.gz; then \
+ rm ghostpcl-current.tar.gz; \
+ ln -s ${exportdir}.tar.gz ghostpcl-current.tar.gz; \
+ fi \
+ | ssh ghostscript.com