优化启动脚本
This commit is contained in:
@@ -1,12 +1,11 @@
|
|||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
|
|
||||||
set "CURRENT_DIR=%cd%"
|
set "CURRENT_DIR=%cd%"
|
||||||
if not "%WILDFIRECHAT_HOME%" == "" goto gotHome
|
|
||||||
set "WILDFIRECHAT_HOME=%CURRENT_DIR%"
|
set "WILDFIRECHAT_HOME=%CURRENT_DIR%"
|
||||||
if exist "%WILDFIRECHAT_HOME%\bin\wildfirechat.bat" goto okHome
|
if exist "%WILDFIRECHAT_HOME%\bin\wildfirechat.bat" goto okHome
|
||||||
cd ..
|
cd ..
|
||||||
set "WILDFIRECHAT_HOME=%cd%"
|
set "WILDFIRECHAT_HOME=%cd%"
|
||||||
cd "%CURRENT_DIR%"
|
set "CURRENT_DIR=%cd%"
|
||||||
:gotHome
|
:gotHome
|
||||||
if exist "%WILDFIRECHAT_HOME%\bin\wildfirechat.bat" goto okHome
|
if exist "%WILDFIRECHAT_HOME%\bin\wildfirechat.bat" goto okHome
|
||||||
echo The WILDFIRECHAT_HOME environment variable is not defined correctly
|
echo The WILDFIRECHAT_HOME environment variable is not defined correctly
|
||||||
|
|||||||
@@ -11,11 +11,14 @@ while [ -h "$PRG" ]; do
|
|||||||
if expr "$link" : '/.*' > /dev/null; then
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
PRG="$link"
|
PRG="$link"
|
||||||
else
|
else
|
||||||
PRG=`dirname "$PRG"`/"$link"
|
PRGDIR=`dirname "$PRG"`
|
||||||
|
cd $PRGDIR
|
||||||
|
PRG="`pwd`"/"$link"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
PRGDIR=`dirname "$PRG"`
|
PRGDIR=`dirname "$PRG"`
|
||||||
|
cd $PRGDIR
|
||||||
cd ..
|
cd ..
|
||||||
WILDFIRECHAT_HOME=`pwd`
|
WILDFIRECHAT_HOME=`pwd`
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user