Warning, /wikitolearn/wikitolearn-sdk/setup-env is written in an unsupported language. File is not indexed.
0001 # Run this script with: 0002 # 0003 # source ./setup-env 0004 0005 unset WTL_DEV_KIT_PATH 0006 unset WTL_DEV_KIT_REPOS_PATH 0007 unset WTL_DEV_KIT_BIN_PATH 0008 0009 if [ "$0" == "/bin/bash" ] || [ "$0" == "bash" ] || [ "$0" == "-bash" ] 0010 then 0011 unset WTL_THIS_SCRIPT_PATH 0012 if [[ $(echo -e "$BASH_VERSION\n4.4.0" | sort -V | head -1) != "4.4.0" ]] 0013 then 0014 echo "Your bash version is too old ($BASH_VERSION)" 0015 return 1 &> /dev/null 0016 exit 1 0017 fi 0018 WTL_THIS_SCRIPT_PATH="$( cd "$(dirname "$BASH_SOURCE")" ; pwd -P )" 0019 else 0020 echo "Can't detect a way to setup your shell ($0), sorry" 0021 echo 0022 echo "Are you load this file with '. ./setup-env' or 'source ./setup-env'?" 0023 echo 0024 return 1 &> /dev/null 0025 exit 1 0026 fi 0027 0028 if [[ -z "$WTL_THIS_SCRIPT_PATH" ]] 0029 then 0030 echo "Missing \$WTL_THIS_SCRIPT_PATH" 0031 echo "Error in the setup process, exit" 0032 return 1 &> /dev/null 0033 exit 1 0034 fi 0035 0036 WTL_DEV_KIT_PATH=$WTL_THIS_SCRIPT_PATH 0037 0038 WTL_DEV_KIT_REPOS_PATH=$WTL_DEV_KIT_PATH"/repositories" 0039 if test ! -d $WTL_DEV_KIT_REPOS_PATH 0040 then 0041 echo "Missing directory '$WTL_DEV_KIT_REPOS_PATH'" 0042 return 1 0043 fi 0044 WTL_DEV_KIT_BIN_PATH=$WTL_DEV_KIT_PATH"/bin" 0045 if test ! -d $WTL_DEV_KIT_BIN_PATH 0046 then 0047 echo "Missing directory '$WTL_DEV_KIT_BIN_PATH'" 0048 return 1 0049 fi 0050 0051 if ! echo "$PATH" | grep -Eq "(^|:)$WTL_DEV_KIT_BIN_PATH($|:)" 0052 then 0053 PATH="$PATH:$WTL_DEV_KIT_BIN_PATH" 0054 fi 0055 0056 export WTL_DEV_KIT_PATH 0057 export WTL_DEV_KIT_REPOS_PATH 0058 export WTL_DEV_KIT_BIN_PATH 0059 0060 eval "$(register-python-argcomplete3 wtl-services-build)" 0061 eval "$(register-python-argcomplete3 wtl-services-run)" 0062 eval "$(register-python-argcomplete3 wtl-services-stop)" 0063 0064 export KEYCLOAK_AUTH_REALM=wikitolearn-local