diff --git a/install.cmd b/install.cmd index 3696c39..172ed79 100644 --- a/install.cmd +++ b/install.cmd @@ -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 \ No newline at end of file +pause