优化启动脚本

This commit is contained in:
imhao183
2021-03-03 18:24:28 +08:00
parent f6e8cd4ca8
commit 2cbbf0a516
2 changed files with 5 additions and 3 deletions
@@ -1,12 +1,11 @@
@ECHO OFF
set "CURRENT_DIR=%cd%"
if not "%WILDFIRECHAT_HOME%" == "" goto gotHome
set "WILDFIRECHAT_HOME=%CURRENT_DIR%"
if exist "%WILDFIRECHAT_HOME%\bin\wildfirechat.bat" goto okHome
cd ..
set "WILDFIRECHAT_HOME=%cd%"
cd "%CURRENT_DIR%"
set "CURRENT_DIR=%cd%"
:gotHome
if exist "%WILDFIRECHAT_HOME%\bin\wildfirechat.bat" goto okHome
echo The WILDFIRECHAT_HOME environment variable is not defined correctly
@@ -11,11 +11,14 @@ while [ -h "$PRG" ]; do
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`/"$link"
PRGDIR=`dirname "$PRG"`
cd $PRGDIR
PRG="`pwd`"/"$link"
fi
done
PRGDIR=`dirname "$PRG"`
cd $PRGDIR
cd ..
WILDFIRECHAT_HOME=`pwd`