Skip to content

Instantly share code, notes, and snippets.

@elrayle
Created January 31, 2019 20:13
Show Gist options
  • Save elrayle/4a9b555f22f1b02db3dcae004377d482 to your computer and use it in GitHub Desktop.
Save elrayle/4a9b555f22f1b02db3dcae004377d482 to your computer and use it in GitHub Desktop.
`fedgo` OR `fedgo -t`
#! /bin/bash
FCREPO_VERSION="4.6.0"
case $1 in
-h )
echo '-----------------------------'
echo 'fcrepo_wrapper startup script'
echo '-----------------------------'
echo 'This script starts fedora using fcrepo_wrapper for either ad hoc development through .internal_test app generated by `rake engine_cart:generate`'
echo 'or for testing through rspec tests.'
echo ''
echo '-d start fedora for ad hoc development testing through .internal_test app generated by `rake engine_cart:generate`'
echo '-t start fedora for testing through rspec tests'
echo '-h show these help instructions'
exit
;;
-t )
PORT="-p 8986"
RUNPATH="$HOME/Services/fedoratest"
DATADIR="$RUNPATH/data"
;;
-d | * )
PORT="-p 8984"
RUNPATH="$HOME/Services/fedoradev"
DATADIR="$RUNPATH/data"
;;
esac
RUNFILE="$RUNPATH/fcrepo-webapp-$FCREPO_VERSION-jetty-console.jar"
ACTION="install"
if [ -d $RUNPATH ] && [ -f $RUNFILE ]; then
ACTION="run"
fi
CMD="fcrepo_wrapper $PORT -i $RUNPATH -d $DATADIR"
echo "Will run command: $CMD"
eval $CMD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment