Better script, do not use default folder without asking.
This commit is contained in:
@@ -9,18 +9,40 @@ echo .git >> %TMP_EXCLUDE%
|
|||||||
echo .svn >> %TMP_EXCLUDE%
|
echo .svn >> %TMP_EXCLUDE%
|
||||||
|
|
||||||
set TMP_TARGET_DIR=%1
|
set TMP_TARGET_DIR=%1
|
||||||
if -%TMP_TARGET_DIR%- == -- goto use_eiffel_library
|
if -%TMP_TARGET_DIR%- == -- goto ask_target_dir
|
||||||
goto start
|
goto start
|
||||||
|
|
||||||
|
:ask_target_dir
|
||||||
|
echo Please provide a installation directory (target library)
|
||||||
|
if -%ISE_LIBRARY%- == -- set ISE_LIBRARY=%EIFFEL_LIBRARY%
|
||||||
|
if -%ISE_LIBRARY%- == -- set ISE_LIBRARY=%ISE_EIFFEL%
|
||||||
|
if -%EIFFEL_LIBRARY%- == -- set EIFFEL_LIBRARY=%ISE_LIBRARY%
|
||||||
|
echo 1: using $EIFFEL_LIBRARY=%EIFFEL_LIBRARY%
|
||||||
|
echo 2: using $ISE_LIBRARY=%ISE_LIBRARY%
|
||||||
|
echo 3: using current directory=%CD%\ewf
|
||||||
|
CHOICE /C 123q /M " > selection:"
|
||||||
|
if .%ERRORLEVEL%. == .1. goto use_eiffel_library
|
||||||
|
if .%ERRORLEVEL%. == .2. goto use_ise_library
|
||||||
|
if .%ERRORLEVEL%. == .3. goto use_current_dir
|
||||||
|
echo No target directory were specified, you can pass it using the command line
|
||||||
|
echo Usage: install_ewf {target_directory}
|
||||||
|
echo Bye ...
|
||||||
|
goto end
|
||||||
|
|
||||||
:use_eiffel_library
|
:use_eiffel_library
|
||||||
if -%EIFFEL_LIBRARY%- == -- goto use_ise_library
|
if -%EIFFEL_LIBRARY%- == -- goto use_ise_library
|
||||||
set TMP_TARGET_DIR=%EIFFEL_LIBRARY%
|
set TMP_TARGET_DIR=%EIFFEL_LIBRARY%
|
||||||
goto start
|
goto start
|
||||||
|
|
||||||
:use_ise_library
|
:use_ise_library
|
||||||
|
if -%ISE_LIBRARY%- == -- goto use_current_dir
|
||||||
set TMP_TARGET_DIR=%ISE_LIBRARY%
|
set TMP_TARGET_DIR=%ISE_LIBRARY%
|
||||||
goto start
|
goto start
|
||||||
|
|
||||||
|
:use_current_dir
|
||||||
|
set TMP_TARGET_DIR=%CD%\ewf
|
||||||
|
goto start
|
||||||
|
|
||||||
:start
|
:start
|
||||||
echo Install framework ewf
|
echo Install framework ewf
|
||||||
mkdir %TMP_TARGET_DIR%\contrib\library\web\framework\ewf\ewsgi
|
mkdir %TMP_TARGET_DIR%\contrib\library\web\framework\ewf\ewsgi
|
||||||
|
|||||||
@@ -2,19 +2,42 @@
|
|||||||
setlocal
|
setlocal
|
||||||
set RDCMD= rd /q/s
|
set RDCMD= rd /q/s
|
||||||
|
|
||||||
|
|
||||||
set TMP_TARGET_DIR=%1
|
set TMP_TARGET_DIR=%1
|
||||||
if -%TMP_TARGET_DIR%- == -- goto use_eiffel_library
|
if -%TMP_TARGET_DIR%- == -- goto ask_target_dir
|
||||||
goto start
|
goto start
|
||||||
|
|
||||||
|
:ask_target_dir
|
||||||
|
echo Please provide a installation directory (target library)
|
||||||
|
if -%ISE_LIBRARY%- == -- set ISE_LIBRARY=%EIFFEL_LIBRARY%
|
||||||
|
if -%ISE_LIBRARY%- == -- set ISE_LIBRARY=%ISE_EIFFEL%
|
||||||
|
if -%EIFFEL_LIBRARY%- == -- set EIFFEL_LIBRARY=%ISE_LIBRARY%
|
||||||
|
echo 1: using $EIFFEL_LIBRARY=%EIFFEL_LIBRARY%
|
||||||
|
echo 2: using $ISE_LIBRARY=%ISE_LIBRARY%
|
||||||
|
echo 3: using current directory=%CD%\ewf
|
||||||
|
CHOICE /C 123q /M " > selection:"
|
||||||
|
if .%ERRORLEVEL%. == .1. goto use_eiffel_library
|
||||||
|
if .%ERRORLEVEL%. == .2. goto use_ise_library
|
||||||
|
if .%ERRORLEVEL%. == .3. goto use_current_dir
|
||||||
|
echo No target directory were specified, you can pass it using the command line
|
||||||
|
echo Usage: install_ewf {target_directory}
|
||||||
|
echo Bye ...
|
||||||
|
goto end
|
||||||
|
|
||||||
:use_eiffel_library
|
:use_eiffel_library
|
||||||
if -%EIFFEL_LIBRARY%- == -- goto use_ise_library
|
if -%EIFFEL_LIBRARY%- == -- goto use_ise_library
|
||||||
set TMP_TARGET_DIR=%EIFFEL_LIBRARY%
|
set TMP_TARGET_DIR=%EIFFEL_LIBRARY%
|
||||||
goto start
|
goto start
|
||||||
|
|
||||||
:use_ise_library
|
:use_ise_library
|
||||||
|
if -%ISE_LIBRARY%- == -- goto use_current_dir
|
||||||
set TMP_TARGET_DIR=%ISE_LIBRARY%
|
set TMP_TARGET_DIR=%ISE_LIBRARY%
|
||||||
goto start
|
goto start
|
||||||
|
|
||||||
|
:use_current_dir
|
||||||
|
set TMP_TARGET_DIR=%CD%\ewf
|
||||||
|
goto start
|
||||||
|
|
||||||
:start
|
:start
|
||||||
echo Uninstall framework: ewf
|
echo Uninstall framework: ewf
|
||||||
%RDCMD% %TMP_TARGET_DIR%\contrib\library\web\framework\ewf
|
%RDCMD% %TMP_TARGET_DIR%\contrib\library\web\framework\ewf
|
||||||
|
|||||||
Reference in New Issue
Block a user