#!/bin/bash
-source configSfi.sh
-
-CWD=`pwd`
+export PATH=$PATH:/etc/geni
+source config_sfi
+CWD=$(pwd)
# private key to use when creating GID for new slice
export TEST_KEY=$CWD/testkey.pkey
echo XXXXX not exist -- this error can be ignored
echo XXXXX -------------------------------------------------------------------
-python ./sfi.py remove --type slice $TEST_SLICE_HRN
+python $(CWD)/sfi.py remove --type slice $TEST_SLICE_HRN
echo XXXXX -------------------------------------------------------------------
echo XXXXX Creating a record for the test slice
echo XXXXX -------------------------------------------------------------------
-python ./editRecord.py --hrn $TEST_SLICE_HRN --pubkeyfile $TEST_KEY --type slice --addresearcher $SFI_USER --outfile $TEST_SLICE_RECORD
+python $(CWD)/editRecord.py --hrn $TEST_SLICE_HRN --pubkeyfile $TEST_KEY --type slice --addresearcher $SFI_USER --outfile $TEST_SLICE_RECORD
echo XXXXX -------------------------------------------------------------------
echo XXXXX Adding the test slice, $TEST_SLICE_HRN
echo XXXXX -------------------------------------------------------------------
-python ./sfi.py add $TEST_SLICE_RECORD
+python $(CWD)/sfi.py add $TEST_SLICE_RECORD
echo XXXXX -------------------------------------------------------------------
echo XXXXX The slice should have one researcher, $SFI_USER
echo XXXXX -------------------------------------------------------------------
-python ./sfi.py show $TEST_SLICE_HRN
+python $(CWD)/sfi.py show $TEST_SLICE_HRN
echo XXXXX -------------------------------------------------------------------
echo XXXXX Adding $TEST_USER_2 to the slice researchers
echo XXXXX -------------------------------------------------------------------
-python ./editRecord.py --infile $TEST_SLICE_RECORD --outfile $TEST_SLICE_RECORD --addresearcher $TEST_USER_2
+python $(CWD)/editRecord.py --infile $TEST_SLICE_RECORD --outfile $TEST_SLICE_RECORD --addresearcher $TEST_USER_2
echo XXXXX -------------------------------------------------------------------
echo XXXXX Updating the slice
echo XXXXX -------------------------------------------------------------------
-python ./sfi.py update $TEST_SLICE_RECORD
+python $(CWD)/sfi.py update $TEST_SLICE_RECORD
echo XXXXX -------------------------------------------------------------------
echo XXXXX The slice record should now have two users: $SFI_USER, $TEST_USER_2
echo XXXXX -------------------------------------------------------------------
-python ./sfi.py show $TEST_SLICE_HRN
+python $(CWD)/sfi.py show $TEST_SLICE_HRN
echo XXXXX -------------------------------------------------------------------
echo XXXXX Removing $SFI_USER from the slice researchers
echo XXXXX -------------------------------------------------------------------
-python ./editRecord.py --infile $TEST_SLICE_RECORD --outfile $TEST_SLICE_RECORD --delresearcher $SFI_USER
+python $(CWD)/editRecord.py --infile $TEST_SLICE_RECORD --outfile $TEST_SLICE_RECORD --delresearcher $SFI_USER
echo XXXXX -------------------------------------------------------------------
echo XXXXX Updating the slice
echo XXXXX -------------------------------------------------------------------
-python ./sfi.py update $TEST_SLICE_RECORD
+python $(CWD)/sfi.py update $TEST_SLICE_RECORD
echo XXXXX -------------------------------------------------------------------
echo XXXXX The slice record should now have one users: $TEST_USER_2
echo XXXXX -------------------------------------------------------------------
-python ./sfi.py show $TEST_SLICE_HRN
+python $(CWD)/sfi.py show $TEST_SLICE_HRN
echo XXXXX -------------------------------------------------------------------
echo XXXXX Updating the slice
echo XXXXX -------------------------------------------------------------------
rm ~/.sfi/slice_testslice.cred
-python ./sfi.py update $TEST_SLICE_RECORD
+python $(CWD)/sfi.py update $TEST_SLICE_RECORD