Skip to content
Snippets Groups Projects
Commit c2f1e290 authored by Timothy Lebo's avatar Timothy Lebo
Browse files

added slash to ns for #2

parent 5607f0c8
No related branches found
No related tags found
No related merge requests found
...@@ -33,38 +33,33 @@ while [ "$everything_ok" != "y" ]; do ...@@ -33,38 +33,33 @@ while [ "$everything_ok" != "y" ]; do
echo echo
aux_basedir="`echo $aux_basedir | sed 's/\/$//'`/" # remove any ending slash and append one. aux_basedir="`echo $aux_basedir | sed 's/\/$//'`/" # remove any ending slash and append one.
if [ "$aux_basedir" != "/" ]; then if [ "$aux_basedir" != "/" ]; then
basedir=`dirname $aux_basedir` basedir=`dirname $aux_basedir | sed 's/\/$//'`/
fi fi
ns=$basedir ns=$basedir
echo "(2/3) What local namespace you will use?" echo "(2/3) What local namespace you will use?"
echo -n "(default '$ns'): " echo -n "(default '$ns'): "
read -u 1 aux_ns read -u 1 aux_ns
echo "" echo ""
if [ "$aux_ns" != "" ] if [ "$aux_ns" != "" ]; then
then ns=$aux_ns
ns=$aux_ns
fi fi
external="" external=""
extra="" extra=""
if [[ "$basedir" =~ ^"$ns" ]]; then if [[ "$basedir" =~ ^"$ns" ]]; then
external="false" external="false"
else else
external="true" external="true"
extra="\$conf['ns']['base'] = '$basedir';" extra="\$conf['ns']['base'] = '$basedir';"
fi fi
echo "(3/3) What is the URL of your SPARQL endpoint?" echo "(3/3) What is the URL of your SPARQL endpoint?"
echo -n "(default $endpoint): " echo -n "(default $endpoint): "
read -u 1 aux_endpoint read -u 1 aux_endpoint
echo "" echo ""
if [ "$aux_endpoint" != "" ] if [ "$aux_endpoint" != "" ]; then
then endpoint=$aux_endpoint
endpoint=$aux_endpoint
fi fi
echo "== Configuration ==" echo "== Configuration =="
...@@ -77,15 +72,14 @@ while [ "$everything_ok" != "y" ]; do ...@@ -77,15 +72,14 @@ while [ "$everything_ok" != "y" ]; do
echo -n "Is everything ok (y/n)?" echo -n "Is everything ok (y/n)?"
read -u 1 everything_ok read -u 1 everything_ok
done done
if [ -e "$settings_file" ]; then if [ -e "$settings_file" ]; then
ts=`date +%s` ts=`date +%s`
settings_backup="$settings_file.$ts" settings_backup="$settings_file.$ts"
echo "Making a backup of existing settings at $settings_backup" echo "Making a backup of existing settings at $settings_backup"
mv $settings_file $settings_backup mv $settings_file $settings_backup
fi fi
LODSPEAKR_HOME=`pwd`/ LODSPEAKR_HOME=`pwd`/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment