Subversion Repositories DevTools

Rev

Rev 4836 | 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
#
########################################################################
#
#
#   Sanity test
#
echo "JATS setup"
if [ ! -d ./TOOLS ] ; then
    echo "ERROR: TOOLS directory not found"
    exit 1
fi

#
#   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 ); do
    chmod +w $file
    dos2unix -ascii $file $file 2>/dev/null
    chmod -w $file 2>/dev/null
done

#
#   Make executables executable
#
chmod -fR a+x ./TOOLS 2>/dev/null
chmod -fR a+x ./BIN.* 2>/dev/null

#
#   Release links for all targets.
#
for dir in ./BIN.*; do
    if [ -d $dir ] ; then
        cd $dir
        echo Processing links in $dir
        [ -f ./links.sh ] && sh ./links.sh
        cd -
    fi
done

echo "JATS setup complete"