|
16 | 16 | @SET /A counter=0 |
17 | 17 | :INSTALL_RUNTIME |
18 | 18 | @SET /A counter+=1 |
19 | | -@IF %counter% GEQ 5 ( |
| 19 | +@IF %counter% GEQ 5 @( |
20 | 20 | @ECHO Could not install msys2-runtime |
21 | 21 | @PAUSE |
22 | 22 | @EXIT 1 |
23 | 23 | ) |
24 | 24 |
|
25 | 25 | @REM Maybe we need a proxy? |
26 | | -@IF %counter% GEQ 2 ( |
| 26 | +@IF %counter% GEQ 2 @( |
27 | 27 | @ECHO. |
28 | 28 | @ECHO There was a problem accessing the MSys2 repositories |
29 | 29 | @ECHO If your setup requires an HTTP proxy to access the web, |
|
32 | 32 | @SET /p proxy= "HTTP proxy: " |
33 | 33 | ) |
34 | 34 | @REM Check the proxy variable here because of delayed expansion |
35 | | -@IF NOT "%proxy%" == "" ( |
| 35 | +@IF NOT "%proxy%" == "" @( |
36 | 36 | @SET http_proxy=%proxy% |
37 | 37 | @SET https_proxy=%proxy% |
| 38 | + @IF %counter% EQU 2 @( |
| 39 | + @COPY "%cwd%"\etc\pacman.conf.proxy "%cwd%"\etc\pacman.conf |
| 40 | + ) |
38 | 41 | ) |
39 | 42 |
|
40 | 43 | @REM update the Pacman package indices first, then force-install msys2-runtime |
41 | 44 | @REM (we ship with a stripped-down msys2-runtime, gpg and pacman), so that |
42 | 45 | @REM pacman's post-install scripts run without complaining about heap problems |
43 | | -@%cwd%\usr\bin\pacman -Sy --force --noconfirm msys2-runtime |
| 46 | +@"%cwd%"\usr\bin\pacman -Sy --force --noconfirm msys2-runtime |
44 | 47 |
|
45 | 48 | @IF ERRORLEVEL 1 GOTO INSTALL_RUNTIME |
46 | 49 |
|
47 | 50 | @SET /A counter=0 |
48 | 51 | :INSTALL_PACMAN |
49 | 52 | @SET /A counter+=1 |
50 | | -@IF %counter% GEQ 5 ( |
| 53 | +@IF %counter% GEQ 5 @( |
51 | 54 | @ECHO Could not install pacman |
52 | 55 | @PAUSE |
53 | 56 | @EXIT 1 |
54 | 57 | ) |
55 | 58 |
|
56 | 59 | @REM next, force update pacman, but first we need bash and info for that. |
57 | | -@%cwd%\usr\bin\pacman -S --force --noconfirm bash info pacman |
| 60 | +@"%cwd%"\usr\bin\pacman -S --force --noconfirm bash info pacman |
58 | 61 |
|
59 | 62 | @IF ERRORLEVEL 1 GOTO INSTALL_PACMAN |
60 | 63 |
|
61 | 64 | @SET /A counter=0 |
62 | 65 | :INSTALL_REST |
63 | 66 | @SET /A counter+=1 |
64 | | -@IF %counter% GEQ 5 ( |
| 67 | +@IF %counter% GEQ 5 @( |
65 | 68 | @ECHO Could not install the remaining packages |
66 | 69 | @PAUSE |
67 | 70 | @EXIT 1 |
68 | 71 | ) |
69 | 72 |
|
70 | 73 | @REM now update the rest |
71 | | -@%cwd%\usr\bin\pacman -S --force --noconfirm ^ |
| 74 | +@"%cwd%"\usr\bin\pacman -S --force --noconfirm ^ |
72 | 75 | base python less openssh patch make tar diffutils ca-certificates ^ |
73 | 76 | git perl-Error perl perl-Authen-SASL perl-libwww perl-MIME-tools ^ |
74 | 77 | perl-Net-SMTP-SSL perl-TermReadKey dos2unix asciidoc xmlto ^ |
|
82 | 85 | @IF ERRORLEVEL 1 GOTO INSTALL_REST |
83 | 86 |
|
84 | 87 | @REM Avoid overlapping address ranges |
85 | | -@IF MINGW32 == %MSYSTEM% ( |
| 88 | +@IF MINGW32 == %MSYSTEM% @( |
86 | 89 | ECHO Auto-rebasing .dll files |
87 | | - CALL %cwd%\autorebase.bat |
| 90 | + CALL "%cwd%"\autorebase.bat |
88 | 91 | ) |
89 | 92 |
|
90 | 93 | @REM If an HTTP proxy is requires, configure it for Git Bash sessions, |
91 | 94 | @REM but only if the environment variable was not already set globally |
92 | | -@IF DEFINED proxy ( |
| 95 | +@IF DEFINED proxy @( |
93 | 96 | @ECHO http_proxy=%proxy% > etc\profile.d\proxy.sh |
94 | 97 | @ECHO https_proxy=%proxy% >> etc\profile.d\proxy.sh |
95 | 98 | @ECHO export http_proxy https_proxy >> etc\profile.d\proxy.sh |
|
99 | 102 |
|
100 | 103 | @REM Before running a shell, let's prevent complaints about "permission denied" |
101 | 104 | @REM from MSys2's /etc/post-install/01-devices.post |
102 | | -@MKDIR %cwd%\dev\shm 2> NUL |
103 | | -@MKDIR %cwd%\dev\mqueue 2> NUL |
| 105 | +@MKDIR "%cwd%"\dev\shm 2> NUL |
| 106 | +@MKDIR "%cwd%"\dev\mqueue 2> NUL |
104 | 107 |
|
105 | | -@IF NOT DEFINED JENKINS_URL ( |
| 108 | +@IF NOT DEFINED JENKINS_URL @( |
106 | 109 | @REM Install shortcut on the desktop |
107 | 110 | @ECHO. |
108 | 111 | @ECHO Installing the 'Git SDK @@BITNESS@@-bit' shortcut on the Desktop |
|
0 commit comments