if [ "x$GSDL3_EXTCLI_HOME" = "x" ] ; then if [ -f ../../gs3-setup-cli.sh ] ; then store_cwd=$PWD cd ../.. && source ./gs3-setup-cli.sh cd "$store_cwd" elif [ -f ../../../gs3-setup-cli.sh ] ; then # Or might be in gs2build/ext store_cwd=$PWD cd ../../.. && source ./gs3-setup-cli.sh cd "$store_cwd" fi fi if [ "x$PYTHON3_HOME" = "x" ] ; then echo "" echo "Warning: Environment variable PYTHON3_HOME not set" else PYTHON3_PARENT_HOME=${PYTHON3_HOME%/*} if [ "$PYTHON3_PARENT_HOME" != "$GSDL3_EXTCLI_HOME/selfcontained-python3" ] ; then echo "" echo "Warning: Environment variable PYTHON3_HOME is set, but its immediate parent directory " echo " is not the directory \$GSDL3_EXTCLI_HOME/selfcontained-python3:" echo " $GSDL3_EXTCLI_HOME/selfcontained-python3" fi fi export HOME="$GSDL3_EXTCLI_HOME/python3-user-home" if [ ! -d "$HOME" ] ; then echo "" echo "Creating directory:" echo " $HOME" mkdir "$HOME" fi echo "" echo "Changing the value of \$HOME to:" echo " $HOME" echo "" echo "This is so pip installed packages (which can consume significant disk space)" echo "are stored in the same area as the Greenstone installation, rather" echo "than the user's home"