Skip to content

Commit

Permalink
Windows install avoids conflict with .mob configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorriegler committed Oct 9, 2024
1 parent 6508528 commit c100c0a
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions install.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,20 @@

echo Installing 'mob' ...

REM set variable for local script
set MOB_HOME=%USERPROFILE%\.mob
REM set for user, not visible for current shell
setx MOB_HOME "%MOB_HOME%"
set target="%MOB_HOME%"
REM set target to the user's bin directory
set target="%USERPROFILE%\bin"

if not exist %target% (
md %target%
echo Directory %target% created.
md %target%
echo Directory %target% created.
)

go build mob.go
copy mob.exe %target%
echo 'mob.exe' installed to %target%

REM add MOB_HOME to PATH, not used in current shell
echo %path%|find /i "%MOB_HOME%">nul || setx path "%path%;%MOB_HOME%"
REM add the user's bin directory to PATH, not used in current shell
echo %path%|find /i "%USERPROFILE%\bin">nul || setx path "%path%;%USERPROFILE%\bin"

echo 'mob' successfully installed.
pause
pause

0 comments on commit c100c0a

Please sign in to comment.