#!/bin/sh
##
##
##          NB NO LONGER USED. SEE 'INSTALL_POPLOG' SCRIPT
##
## $local/com/SETUPDIRS
## http://www.cs.bham.ac.uk/research/poplog/com/SETUPDIRS
## Set up poplog directories
## Revised 15 Mar 2004
##      Altered to v15.53f
## Revised 15 Mar 2004
##      Altered to v15.53e

## Revised 30 Oct 2003
##      Altered to create poplog and poplog.sh start scripts
##
## Run this as root


if [ "$1x" == "x" ]
then
    # no argument supplied

    ## EDIT THIS LINE IF NECESSARY: location for $usepop $poplocal, etc.
    rootdir=/usr/local/poplog

else

    rootdir=$1
fi

export rootdir

echo "set rootdir to " $rootdir
echo "creating directories for poplog and local extensions in $rootdir"


## Change this for new version of Poplog
mkdir $rootdir $rootdir/v15.53f $rootdir/local

chmod 755 $rootdir $rootdir/v15.53f $rootdir/local

export usepop=$rootdir/v15.53f

## Location for local saved images
## Version specific
export poplocalbin=$usepop/poplocalbin

mkdir $poplocalbin

export poplocal=$rootdir

export local=$poplocal/local

echo "poplocal $poplocal ; local $local"

cd startup
echo "Creating startup scripts"
./CREATE_SCRIPTS $rootdir
ls -l poplog*
echo "poplog and poplog.sh startup scripts Done"

cd $rootdir
# create some useful symbolic links
ln -s v15.53f current.poplog
ln -s v15.53f v15.53
