Rev 7299 | Blame | Compare with Previous | Last modification | View Log | RSS feed
#! /bin/bash########################################################################## JATS Post Installation Setup for SOLARIS/LINUX## This command is to be executed in the directory in which it is found## Note: This MUST be a UNIX format file, not a DOS formatted file## The script may be called automatically when the package is released# into dpkg_archive. If this is then three arguments will be provided:# archive - name of the archive# name - Name of this package# version - version of this package# This installer will create a symlink in the parent directory to# assist in the timely rollout of a new version of jats.# The script will create a symlink from jats2_new to this version## Every night a cronjob on hte master package server will run to# update the jats2_current symlink, from the jats2_new symlink############################################################################ Sanity test#echo "JATS setup"if [ ! -d ./TOOLS ] ; thenecho "ERROR: TOOLS directory not found"exit 1fi## Ensure some essential scripts are not in DOS format# The TOOLS/*.pl file conversion will ensure that pod2usage() operates#for file in ./TOOLS/armerge ./BIN.*/links.sh $( find ./TOOLS -name *.pl ); dochmod +w $filedos2unix -ascii $file $file 2>/dev/nullchmod -w $file 2>/dev/nulldone## Make executables executable#chmod -fR a+x ./TOOLS 2>/dev/nullchmod -fR a+x ./BIN.* 2>/dev/null## Release links for all targets.#for dir in ./BIN.*; doif [ -d $dir ] ; thencd $direcho "Processing links in $dir"[ -f ./links.sh ] && sh ./links.shcd - > /dev/nullfidone## Possibly - if run by the build system# Must have at least 3 args# 3rd arg must be this version of the package# Create a symlink in the parent diretory to this version#if [ $# -ge 3 ]; thenthisVer=${PWD##*/}if [ "$3" = "$thisVer" ] ; thenecho "Creating jats2_new symlink to $thisVer"pushd .. >/dev/nullrm -f jats2_newln -s $thisVer jats2_newpopd >/dev/nullfifiecho "JATS setup complete"