#! /bin/sh

# This script must be run if the Pathena installation is to be
# placed anywhere other than the default location of ~/.pathena.
# After moving or unpacking to the intended location, change to
# that directory and run the script using this command:
#   ./build/relocate

echo "Changing the base directory to $PWD for"
echo "each Pathena shell script."

for f in bin/* build/*; do
  sed -e "s|^export PATHENA=.*$|export PATHENA=$PWD|" < $f > tmp5439;
  mv tmp5439 $f
  chmod a+x $f;
  done;
rm -f tmp5439

echo "All bin scripts have been updated."


