Skip to content

Commit

Permalink
Bugfix environment handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mepux committed Jul 19, 2020
1 parent c581872 commit 94d4cf0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
major.number = 0
minor.number = 6
revision.number = 1
revision.number = 2
qualifier =
2 changes: 1 addition & 1 deletion bin/cb-install
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ PN=$(basename "$0")
CB_FORCE_INSALL=false
CB_INSTALL_ONLY_STABLE=true
CB_INSTALLER_SILENT=false
CB_INSTALLER_VERSION=0.6.1
CB_INSTALLER_VERSION=0.6.2
CB_RELEASE_URL=https://api.github.com/repos/toolarium/common-build/releases
FULLTIMESTAMP="date '+%Y%d%m%H%M%S'"
USER_FRIENDLY_FULLTIMESTAMP="date '+%d.%m.%Y %H:%M:%S'"
Expand Down
9 changes: 4 additions & 5 deletions bin/cb-install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ set "CB_USER_DRIVE=%CD:~0,2%"
set "CB_SCRIPT_PATH=%~dp0"
set "CB_SCRIPT_DRIVE=%~d0"
set CB_FORCE_INSALL=false
set "CB_INSTALLER_VERSION=0.6.1"
set "CB_INSTALLER_VERSION=0.6.2"
set "CB_RELEASE_URL=https://api.github.com/repos/toolarium/common-build/releases"

title %PN%
Expand Down Expand Up @@ -174,21 +174,20 @@ setx CB_HOME "%CB_DEVTOOLS%\%CB_VERSION_NAME%" >nul 2>nul
:SET_CBHOME_END

:: upate path
if not [%CB_PREVIOUS_VERSION_NAME%] equ [%CB_VERSION_NAME%] goto CB_SET_PATH
if [%CB_PREVIOUS_VERSION_NAME%] neq [%CB_VERSION_NAME%] goto CB_SET_PATH
if [%CB_INSTALLER_SILENT%] equ [false] echo %CB_LINEHEADER%Found previous version %CB_PREVIOUS_VERSION_NAME% in PATH, don't change PATH variable
goto SET_PATH_END

:CB_SET_PATH
:: read user path and cleanup
set "PATH=%CB_HOME%\bin;%PATH%"
set USER_PATH=
if exist %CB_HOME%\bin\cb-cleanpath.bat call %CB_HOME%\bin\cb-cleanpath.bat --user toolarium
if .%USER_PATH% == . goto SET_PATH_END
if exist %CB_HOME%\bin\cb-cleanpath.bat call %CB_HOME%\bin\cb-cleanpath.bat --user toolarium 2>nul
if [%CB_INSTALLER_SILENT%] equ [false] echo %CB_LINEHEADER%Update CB_HOME in the user PATH environment
setx PATH "%CB_HOME%\bin;%USER_PATH%" >nul 2>nul
::call %CB_HOME%\bin\cb-cleanpath.bat --system toolarium
::setx -m PATH "%SYSTEM_PATH%" >nul 2>nul
:SET_PATH_END
set "PATH=%CB_HOME%\bin;%PATH%"
set "CB_BIN=%CB_HOME%\bin"
if not exist %CB_BIN% (mkdir %CB_BIN% >nul 2>nul)
set "CB_LOGS=%CB_HOME%\logs"
Expand Down

0 comments on commit 94d4cf0

Please sign in to comment.