Skip to content
Snippets Groups Projects
Commit e80afbce authored by rds's avatar rds
Browse files

remove some old and unused files

parent 62e6acfa
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
#
# encapsulate docs production....
#
#
#
# foocanvas.html needs to have headers removed from it and have links
# to pages prepared as above.
#
# May also be useful to do some gtk headers as well...
#
# and perhaps some other stuff like expat etc.
#
#
#
# main routine
#
# set up common functions.
. ZBfunctions $0
# Prepares the foocanvas docs...
#
foocanvasDocs ()
{
foocanvas_docs="foo-canvas.h foo-canvas-widget.h foo-canvas-util.h foo-canvas-text.h \
foo-canvas-rect-ellipse.h foo-canvas-polygon.h foo-canvas-pixbuf.h \
foo-canvas-line.h"
src_dir=$1
dest_dir=$2
opsys=`uname`
case $opsys in
OSF1 )
output_flag='-W' ;;
Linux )
output_flag='-w' ;;
* )
ZBmsgAndExit "unsupported operating system: $opsys" ;;
esac
for i in $foocanvas_docs
do
header="$src_dir/$i"
html="$dest_dir/`basename $i`.shtml"
echo "$header -> $html"
enscript --color $output_flag html -Ec -o $html $header || ZBmsgAndExit "enscript failed."
done
}
# set up usage strings.
cmdstring='<destination_directory>'
descstring='
<destination_directory> the root directory of the zmap web pages.'
ZBacedb=~zmap
ZBBaseDir="$ZBacedb/ZMap"
ZBOverDir="$ZBacedb/ZMap.OVERNIGHT.BUILD"
ZBDevDir="$ZBacedb/ZMap.DEVELOPMENT.BUILD"
doc_rep="$ZBDevDir/ZMap"
doc_make_dir="$doc_rep/src"
#while getopts ":p" opt ; do
# case $opt in
# p ) webpublish='true' ;;
# \? ) ZBusage "$cmdstring" "$descstring" "Bad command line flag"
# esac
#done
# Get the source directory to be linked to.
shift $(($OPTIND - 1))
if [ -z "$1" ] ; then
ZBusage "$cmdstring" "$descstring" "no zmap web page root directory specified."
fi
web_site=$1
# we need to run whatever scripts to create some of the dynamic pages, maybe these should be in
# a special makefile somewhere....
foocanvas_src_dir="$ZBacedb/prefix/LINUX/include/libfoocanvas-1.0/libfoocanvas"
foocanvas_dest_dir="$web_site/foocanvas"
foocanvasDocs $foocanvas_src_dir $foocanvas_dest_dir
exit 0
#!/bin/bash
. ZBfunctions $0
ZBExportOSVars
# $1 should be DEVELOPMENT, EXPERIMENTAL or SUPPORTED
# $2 should be DEVELOPMENT, OVERNIGHT
# $3 should be LINUX, DARWIN
# This is all because we can't get a mac on the network with nfs mounts ;)
# if we do it'll all go away ;)
# hmm, would this help? http://www.bresink.de/osx/nis.html
source_acedb=$1
dest_zmap=$2
zmap_arch=$3
acedb_arch=$3
if [ "x$zmap_arch" == "x" ]; then
zmap_arch=$ZBbuildOSCanon
acedb_arch=$ZBbuildOSCanon
ZBlogmsg "Defaulting to machine architecture"
fi
if [ "x$acedb_arch" == "xMACOSX" ]; then
ZBlogmsg "switching MACOSX to DARWIN for acedb..."
acedb_arch="DARWIN"
fi
if [ "x$zmap_arch" == "xDARWIN" ]; then
ZBlogmsg "switching DARWIN to MACOSX for zmap..."
zmap_arch="MACOSX"
fi
ZBlogmsg "Using '$zmap_arch' for zmap architecture dir."
ZBlogmsg "Using '$acedb_arch' for acedb architecture dir."
acedb=~acedb
target=$ZBBaseDir/BIN.$dest_zmap/$zmap_arch/bin
source=$ZBAcedbHOME'/RELEASE.'$source_acedb'/bin.'$acedb_arch'_4/'
# copy all the files from acedb release
echo "Copying $ZBAcedbBinaries ..."
echo "Source = $source, Target = $target"
# make sure the target of the symlink exists
sym_target=`readlink -q $ZBBaseDir/BIN.$dest_zmap`
mkdir -p $ZBBaseDir/BIN.$dest_zmap
# make sure the rest of the target exists...
mkdir -p $target
for binary in $ZBAcedbBinaries
do
cp $source/$binary $target/$binary || ZBmsgAndExit "Failed to copy $binary"
done
exit 0
#!/bin/bash
#
# Create the symbolic links in ~zmap to point to the various releases of zmap.
#
#
# main routine
#
# set up common functions.
. ZBfunctions $0
# set up usage strings.
cmdstring='[-o] [-d] [-r] <source_directory>'
descstring='
-o link ~zmap/BUILD.OVERNIGHT to source_directory (default)
-d link ~zmap/BUILD.DEVELOPMENT to source_directory (default)
-r link ~zmap/BUILD.RELEASE to source_directory (default)'
linksroot=~zmap
prefix='ZMap'
suffix='BUILD'
overnight=$prefix'.OVERNIGHT.'$suffix
development=$prefix'.DEVELOPMENT.'$suffix
release=$prefix'.RELEASE.'$suffix
links=""
while getopts ":odr" opt ; do
case $opt in
o ) links="$links $overnight" ;;
d ) links="$links $development" ;;
r ) links="$links $release" ;;
\? ) ZBusage "$cmdstring" "$descstring" "Bad command line flag"
esac
done
# Get the source directory to be linked to.
shift $(($OPTIND - 1))
if [ -z "$1" ] ; then
ZBusage "$cmdstring" "$descstring" "No link source directory specified."
fi
sourcedir=$1
# default to overnight link...
if [ -z "$links" ] ; then
links=$overnight
fi
# move to ~zmap where we will make the symbolic links.
#
ZBGotoDir $linksroot
# Make sure the source dir exists.
#
if [ ! -d $sourcedir ] ; then
ZBmsgAndExit "Cannot find source directory for link: $sourcedir"
fi
for dir in $links
do
if [ -L $dir ] ; then
rm -f $dir || ZBmsgAndExit "Cannot remove symbolic link: $linksroot/$dir"
fi
ln -s $sourcedir $dir || ZBmsgAndExit "Cannot make symbolic link: $linksroot/$dir"
done
exit 0
#!/bin/bash
#
# Runs make on requested target (defaults to no target)
#
#
# main routine
#
# set up common functions.
. ZBfunctions $0
ZBlogmsg "ZMap make started"
# set up usage strings.
cmdstring='<make_directory>'
descstring='
-t <target> target for the make (defaults to no target which usually means "all").
-b run bootstrap script before doing the make.
-c run configure script before doing the make.
-p <prefix> do make install and use location when doing so.
<make_directory> specifies FULL PATH of directory where make is take place.'
bootstrap=""
configure=""
target=""
prefix=""
perl_prefix=""
while getopts ":bct:p:" opt ; do
case $opt in
b ) bootstrap='true' ;;
c ) configure='true' ;;
t ) target=$OPTARG ;;
p ) prefix="--prefix=$OPTARG"; perl_prefix=$OPTARG;;
\? ) ZBusage "$cmdstring" "$descstring" "Bad command line flag"
esac
done
# Get the source directory for the build.
shift $(($OPTIND - 1))
if [ -z "$1" ] ; then
ZBusage "$cmdstring" "$descstring" "No target build directory specified."
fi
builddir=$1
# move to the build directory.
#
ZBGotoDir $builddir
# do the build.
#
if [ -n "$bootstrap" ] ; then
ZBmsgInfo "running bootstrap"
$builddir/runbootstrap || ZBmsgAndExit "runbootstrap script failed"
fi
if [ -n "$configure" ] ; then
ZBmsgInfo "running configure"
ZBExportOSVars
echo $ZBbuildOSDir
ZBGotoDir $ZBbuildOSDir
if [ "x$prefix" != "x" ] ; then
$builddir/runconfig $prefix/$ZBbuildOSCanon || ZBmsgAndExit "runconfig script failed"
else
$builddir/runconfig || ZBmsgAndExit "runconfig script failed"
fi
fi
make $target || ZBmsgAndExit "make $target failed in `pwd`"
if [ -n "$prefix" ] ; then
ZBmsgInfo "running make install"
make install || ZBmsgAndExit "make install failed in `pwd`"
ZBmsgInfo "running X11::XRemote build and install"
# untested. RDS
$builddir/perl/build.sh $perl_prefix/$ZBbuildOSCanon || ZBmsgAndExit "X11::XRemote build failed"
fi
# A hack really, generalise to run a given command if you feel like it...
#
if [ -z $target ] ; then
$builddir/runzmap '--version' || ZBmsgAndExit "zmap would not run"
fi
ZBlogmsg "ZMap make finished"
exit 0
#!/usr/local/bin/bash
#
# Make a release directory and put into it all the required binaries for a zmap/acedb
# release. This script is a bit brain dead so don't expect too much. In particular
# it expects there to already be ~zmap/prefix/XXXX/bin directories containing binaries
# for different machines.
#
#
# main routine
#
# set up common functions.
. ZBfunctions $0
# set up usage strings.
cmdstring='[-a | -l | -m] [target_directory]'
descstring='
-a just copy Alpha binaries.
-l just copy Linux binaries.
-m just copy Mac binaries.
[target_build_directory]
specifies target directory for binaries, defaults to "ZMap_V.R.U"'
zmap_dir=~zmap
machines='ALPHA LINUX'
prefix_dir=$zmap_dir/prefix
acedb_binaries='tace xace sgifaceserver makeUserPasswd blixem dotter'
zmap_binaries='zmap'
binaries="$acedb_binaries $zmap_binaries"
while getopts ":alm" opt ; do
case $opt in
a ) machines='ALPHA' ;;
l ) machines='LINUX' ;;
m ) machines='MACOSX' ;;
\? ) ZBusage "$cmdstring" "$descstring" "invalid option"
esac
done
# Get a target directory...if there is one...
shift $(($OPTIND - 1))
if [ "$1" ] ; then
build_dir=$1
else
version=`zmap --version`
set $version
build_dir=$1_$3
fi
# Make the build directory, bomb out if if already exists....
#
if [ -d $build_dir ] ; then
ZBmsgAndExit "Cannot continue, $build_dir already exists."
else
mkdir $build_dir || ZBmsgAndExit "Cannot make release directory: $build_dir"
ZBGotoDir $build_dir
for i in $machines
do
mkdir $i || ZBmsgAndExit "Cannot make binary directory: $i"
bin_dir=$prefix_dir/$i/bin
for j in $binaries
do
cp $bin_dir/$j $i || ZBmsgAndExit "Cannot copy file $bin_dir/$j to $i"
done
done
fi
exit 0
#!/bin/bash
#
# Builds the release notes as much as is possible. Currently it does
# not seem possible to automate the Request Tracker queries that get
# the tickets that have been resolved after a certain date.
#
# How to run the script:
#
# zmapreleasenotes <last_release_date> <target_dir>
#
# e.g.
#
#
#
#
#
# main routine
#
# set up common functions.
. ZBfunctions $0
# Setting this variable means fatal messages also get mailed to the zmap developers
# mail alias.
#
# uncomment when I've finished testing...sigh...
#
#ZBmailOnExit="true"
# set up usage strings.
cmdstring='[ -b<builddir> -d<date> -n -z ] <target_release_notes_directory>'
descstring='
-b specify a directory where the build will occur
-d specify date from which changes/tickets should be extracted,
date must be in form "dd/mm/yyyy" (defaults to date in ZMap/doc/Release_notes/LAST_RELEASE_DATE.txt)
-n DO NOT put the release notes in cvs or update the date file there
-z do only zmap release notes (default is to include acedb etc. as well)
<target_release_notes_directory>
specifies the directory where the release notes will be built and copied to.'
build='all'
targetdir=''
builddir=$ZBReleaseBase
zmap_CVSROOT=$ZBCVSRoot
zmap_src_dir='ZMap/src'
zmap_doc_dir='ZMap/doc'
release_notes_dir="$zmap_doc_dir/Release_notes"
webpagefile="include/ZMap/zmapWebPages.h"
acedb_release_dir="$ZBAcedbHOME/RELEASE."$ZBAcedbVersion'.BUILD'
rel_template='release_notes_template.shtml'
rel_prefix='release_notes'
rel_suffix='shtml'
last_release_file="LAST_RELEASE_DATE.txt"
#
# Get the cmd line stuff...
#
while getopts ":b:d:nz" opt ; do
case $opt in
b ) builddir=$OPTARG ;;
d ) prev_date=$OPTARG ;;
n ) no_cvs="true" ;;
z ) build="zmap" ;;
\? ) ZBusage "$cmdstring" "$descstring" "Bad command line flag"
esac
done
shift $(($OPTIND - 1)) # Move on to rest of cmdline args.
# Get the target directory for the build.
if [ -z "$1" ] ; then
ZBusage "$cmdstring" "$descstring" "No target directory specified."
fi
targetdir=$1
#
# Now we've got everything signal that the build has started.
#
ZBlogmsg "Build release notes started"
# Set up the build directory.
ZBGotoDir $targetdir
mkdir -p $builddir || ZBmsgAndExit "Cannot make build directory: $builddir"
ZBGotoDir $builddir
# check out zmap and if requested, acedb source, note, we don't need all of the zmap source stuff....
#
CVSROOT="$zmap_CVSROOT"
ZBlogmsg "Checking out from $CVSROOT"
cvs checkout $zmap_doc_dir || ZBmsgAndExit "Cannot checkout release notes directory: $zmap_doc_dir"
cvs checkout $zmap_src_dir || ZBmsgAndExit "Cannot checkout source code directory: $release_notes_dir"
if [ $build = 'all' ] ; then
ZBlogmsg "Using Acedb Source in $acedb_release_dir rather than checking out local copy"
#cvs export $acedb_src_dir || ZBmsgAndExit "Cannot checkout source code directory: $release_notes_dir"
fi
# Get the date to use for looking for cvs changes and RT tickets and set up
# dates for RT and cvschanges. If the user didn't specify one, we use the date
# in the cvs file LAST_RELEASE_DATE.txt in doc/Release_notes
#
if [ -z "$prev_date" ] ; then
prev_date=`cat $release_notes_dir/$last_release_file` || ZBmsgAndExit "Cannot access date from date file $last_release_file"
fi
rt_date=$prev_date
rt_todays_date=`date "+%d/%m/%Y"`
sep=$IFS
IFS='/'
set $prev_date
prev_date="$3-$2-$1"
IFS=$sep
# Note how cvs needs tomorrows date in order to return todays changes...sigh...
tomorrows_date=`date -d"tomorrow" "+%Y-%m-%d"`
cvs_date="$prev_date<$tomorrows_date"
#echo $rt_date
#echo $cvs_date
# Set up the release notes file....
file_date=`date "+%Y_%m_%d"`
release_file="$rel_prefix.$file_date.$rel_suffix"
touch $release_file || ZBmsgAndExit "Cannot touch $release_file"
chmod u+rw $release_file || ZBmsgAndExit "Cannot make $release_file readable/writeable"
# We need a human readable date in several places in the html.
text_date=`date "+%e %B %Y"`
#
# Write the proper header for sanger pages
# oops some stuff to construct here...the date !!
#
echo '<!--#set var="banner" value="ZMap Release Notes For '$text_date'"-->' >> $release_file
echo '<!--#include virtual="/perl/header"-->' >> $release_file
echo '<!--#set var="author" value="edgrif@sanger.ac.uk" -->' >> $release_file
echo >> $release_file
# Extract the zmap version from the code header.
#
zmap_version=`grep ZMAP_VERSION ZMap/src/zmapUtils/zmapUtils_P.h`
set $zmap_version
zmap_version=$3
zmap_release=`grep ZMAP_RELEASE ZMap/src/zmapUtils/zmapUtils_P.h`
set $zmap_release
zmap_release=$3
zmap_update=`grep ZMAP_UPDATE ZMap/src/zmapUtils/zmapUtils_P.h`
set $zmap_update
zmap_update=$3
#echo "zmap version: $zmap_version $zmap_release $zmap_update"
zmap_version_txt="$zmap_version.$zmap_release.$zmap_update"
echo "<h3>Release Version: ZMap $zmap_version_txt</h3>" >> $release_file
echo >> $release_file
echo "<h3>Release Date: $text_date</h3>" >> $release_file
echo >> $release_file
echo
echo "<P>" >> $release_file
echo "(Last release was on $rt_date)" >> $release_file
echo >> $release_file
echo "<h3>Request Tracker Tickets Resolved</h3>" >> $release_file
echo >> $release_file
RTSERVER=scratchy
# do zmap RT tickets
#
echo >> $release_file
echo "<h4>ZMap</h4>" >> $release_file
echo >> $release_file
echo "<PRE>" >> $release_file
change_file='ZMap.cvschanges'
# use this for debugging your changed versions of the script.
#ZBgetRTtickets="$HOME/ZMap/ZMap_bugfix/ZMap/scripts/getRTtickets"
ZBlogmsg $ZBgetRTtickets $rt_date zmap
ssh $RTSERVER "$ZBgetRTtickets $rt_date zmap" > $change_file
cat $change_file | grep -v 'sysmandir' | grep -v 'Queue' >> $release_file
rm -f $change_file || ZBmsgAndExit "Cannot remove changes file: $change_file"
echo "</PRE>" >> $release_file
echo >> $release_file
# do acedb RT tickets
#
if [ $build = 'all' ] ; then
echo >> $release_file
echo "<h4>Acedb</h4>" >> $release_file
echo >> $release_file
echo "<PRE>" >> $release_file
change_file='acedb.cvschanges'
ZBlogmsg $ZBgetRTtickets $rt_date acedb
ssh $RTSERVER $ZBgetRTtickets $rt_date acedb > $change_file
cat $change_file | grep -v 'sysmandir' | grep -v 'Queue' >> $release_file
rm -f $change_file || ZBmsgAndExit "Cannot remove changes file: $change_file"
echo "</PRE>" >> $release_file
echo >> $release_file
fi
year=`date "+%Y"` # Used for filtering cvschanges output.
# do zmap cvs changes
#
echo >> $release_file
echo "<h3>ZMap Changes/Fixes</h3>" >> $release_file
echo >> $release_file
change_file='ZMAP.CHANGEFILE'
cvschanges -o$change_file -z $cvs_date ./ZMap || ZBmsgAndExit "cvschanges for zmap did not complete"
cat $change_file > /dev/null || ZBmsgAndExit "$change_file does not exist"
cat $change_file | grep -v $year | perl -lne 's/\*/<p>/; print' >> $release_file
rm -f $change_file || ZBmsgAndExit "Cannot remove change file: $change_file"
# don't remove local copy of zmap cvs yet, needed below.
echo >> $release_file
# do acedb cvs changes
#
if [ $build = 'all' ] ; then
echo >> $release_file
echo "<h3>Acedb Changes/Fixes</h3>" >> $release_file
echo >> $release_file
change_file='ACEDB.CHANGEFILE'
cvschanges -o$change_file -a $cvs_date $acedb_release_dir || ZBmsgAndExit "cvschanges for acedb did not complete"
cat $change_file > /dev/null || ZBmsgAndExit "$change_file does not exist"
cat $change_file | grep -v $year | perl -lne 's/\*/<p>/; print' >> $release_file
rm -f $change_file || ZBmsgAndExit "Cannot remove change file: $change_file"
#rm -rf ./acedb || ZBmsgAndExit "Cannot remove local copy of acedb"
echo >> $release_file
fi
#
# Add the proper html footer for sanger pages.
#
echo >> $release_file
echo '<!--#include virtual="/perl/footer"-->' >> $release_file
echo >> $release_file
#
# Optionally stick the notes in cvs and update the last release data file.....
#
if [ -z "$no_cvs" ] ; then
ZBCVSacceptDuplicates=false
mv -f $release_file $release_notes_dir/ || ZBmsgAndExit "Cannot move $release_file to $release_notes/"
ZBGotoDir $release_notes_dir
ZBsafeCVSadd $release_file
cvs commit -m "new zmap release notes for $text_date" $release_file || ZBmsgAndExit "Cannot cvs commit $release_file in $release_notes_dir/"
cvs edit $last_release_file || ZBmsgAndExit "Cannot cvs edit $last_release_file"
echo $rt_todays_date > $last_release_file || ZBmsgAndExit "Cannot read date from $last_release_file"
cvs commit -m "update last release notes to $rt_date" $last_release_file || ZBmsgAndExit "Cannot cvs commit $last_release_file"
# Put the name of the file containing these release notes into the webpages header file
# so the code is tied to the release notes.
# We want to edit this line: #define ZMAPWEB_RELEASE_NOTES "release_notes.2007_02_28.shtml"
#
ZBGotoDir $builddir
ZBGotoDir $zmap_src_dir
cvs edit $webpagefile || ZBmsgAndExit "Cannot cvs edit $webpagefile"
perl -i -lne 's/(\#define\sZMAPWEB_RELEASE_NOTES\s)(.+)/$1"'$release_file'"/; print' $webpagefile || ZBmsgAndExit "Cannot perl edit $webpagefile"
cvs commit -m "update release notes file to $release_file" $webpagefile || ZBmsgAndExit "Cannot cvs commit $webpagefile"
fi
# Now we can remove our local cvs copy of zmap.
rm -rf ./ZMap || ZBmsgAndExit "Cannot remove local copy of ZMap"
# Mail us to remind us to edit the release notes as there will be some editting to do...
#
ZBmsgMail "ZMap $zmap_version_txt release notes in $release_file need editting." 'Release Notes Created'
# Record end of build.
#
ZBlogmsg "Build release notes finished"
exit 0
#!/usr/local/bin/bash
#
# Update the ZMap website in wwwDev and optionally update the live website as well.
#
# Currently the script assumes the
#
# we need user to be able to specify a directory to take docs from or we should
# use a default or do a cvs checkout and use that....
#
#
# main routine
#
# set up common functions.
. ZBfunctions $0
# set up usage strings.
cmdstring='[-p] <doc_repository>'
descstring='
-p Publish to the live website as well
<doc_repository> working copy of ZMap repository from which docs will be copied.'
ZBacedb=~zmap
ZBBaseDir="$ZBacedb/ZMap"
ZBOverDir="$ZBacedb/BUILD.OVERNIGHT"
ZBDevDir="$ZBacedb/BUILD.DEVELOPMENT"
ZBExportOSVars
if [ ! -z $ZBbuildOSDir ] ; then
ZBbuildOSDir=$ZBbuildOSDir/
fi
webpublish=''
web_site='/nfs/WWWdev/SANGER_docs/htdocs/Software/analysis/ZMap'
doc_dirs="web/* src/${ZBbuildOSDir}docs/ZMap/html doc"
while getopts ":p" opt ; do
case $opt in
p ) webpublish='true' ;;
\? ) ZBusage "$cmdstring" "$descstring" "Bad command line flag"
esac
done
# Get the source directory to be linked to.
shift $(($OPTIND - 1))
if [ -z "$1" ] ; then
ZBusage "$cmdstring" "$descstring" "Working copy of ZMap repository must be specified."
fi
doc_rep=$1
# Make sure the website dir exists and is writeable/executable....
#
if [[ ! -d $web_site || ! -r $web_site || ! -w $web_site || ! -x $web_site ]] ; then
ZBmsgAndExit "Development Website directory must exist and be readable/writeable/executable: $web_site"
fi
for dir in $doc_dirs
do
this_dir="$doc_rep/$dir"
# This doesn't work because I can't get dirname to clip $dir in the way I want....
# if [[ ! -d $this_dir || ! -r $this_dir || ! -x $this_dir ]] ; then
# ZBmsgAndExit "Repository for website docs must exist and be readable/executable: $this_dir"
# fi
cp -fr $this_dir $web_site || ZBmsgAndExit "Could not copy $this_dir to $website"
done
# Set up docs that needs generating/copying in some way...
#
zmapdocs $web_site || ZBmsgAndExit "Processing of docs by zmapdocs script failed."
# -t is for test apparently....
if [ -n "$webpublish" ] ; then
webpublish -t $web_site || ZBmsgAndExit "Could not copy docs to live web site."
fi
exit 0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment