-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.bat
More file actions
54 lines (39 loc) · 1.88 KB
/
install.bat
File metadata and controls
54 lines (39 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
SET utils_file="%~dp0%lib\utils.bat"
SET _error_handlers="%~dp0lib\err_handlers.bat"
@REM Temporarily prevents call to automated installation. SETX is too volatile and might corrupt user environvment variables
SET exception_msg="Unstable function. It its recommended to set the PVM path environment variable manually"
CALL %_error_handlers% ERR_NOT_IMPLEMENTED %exception_msg% & goto :eof
@REM SET is_installed=
@REM CALL %utils_file% B_PATH_HAS_STRING %CONF_DEF_INSTALL_PATH% is_installed
@REM @REM prompt for reinstall or just return
@REM if %is_installed% equ true ( echo PHP Version Manager already appears to be installed. & goto :eof )
@REM @REM Perform installation
@REM echo No current installation found for PVM.
@REM set /P confirmation="Install now?[y|n]: "
@REM if %confirmation% equ n ( goto :eof )
@REM @REM rewrites instalation message for better ux
@REM echo Installing program...
@REM xcopy /s /q %~dp0 %CONF_DEF_INSTALL_PATH%
@REM cls
@REM echo Installing program...
@REM @REM Appends default installation dir to PATH
@REM CALL SET updated_path=%PATH%;%CONF_DEF_INSTALL_PATH%
@REM @REM echo "PATH=%updated_path%"
@REM @REM SETX path "%updated_path%" /M
@REM SET "PATH=%updated_path%"
@REM @REM Confirms installation
@REM set has_installed=
@REM CALL %utils_file% B_PATH_HAS_STRING %CONF_DEF_INSTALL_PATH% has_installed
@REM if %has_installed% equ true (
@REM echo ____________________________________
@REM echo PHP Version Manager installed succesfully.
@REM echo ____________________________________
@REM CALL :DRAW_PVM_LOGO
@REM echo You can check the available commands with "pvm --help". & goto :eof
@REM )
@REM echo Process ended.
@REM echo Could not identify PHP Version Manager instalation in environment. Please restart your machine and confirm the installation with "pvm -v" & goto :eof
@REM EXIT /b 0
@REM :DRAW_PVM_LOGO
@REM type assets/pvm_logo.txt
@REM exit /b 0