Created
May 8, 2024 00:59
-
-
Save SegHaxx/9ac209305fed71fca61de48b3dc0372f to your computer and use it in GitHub Desktop.
My MSYS2 install script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem elevate -w choco install -y msys2 --params "/NoUpdate /InstallDir:C:\msys64" | |
cd c:\msys64 | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
rem Use windows home directory | |
usr\bin\sed.exe -i 's/^\(db_home: \)\(cygwin.*\)$/\1windows/' etc\nsswitch.conf | |
rem Enable windows native symlinks | |
usr\bin\sed.exe -i 's/^\(rem \)\(set MSYS=winsymlinks:nativestrict\)/\2/' msys2_shell.cmd | |
rem Create Shortcut | |
powershell "$s=(New-Object -COM WScript.Shell).CreateShortcut('%userprofile%\Start Menu\Programs\MSYS2 Shell.lnk');$s.TargetPath='C:\msys64\msys2_shell.cmd';$s.Arguments='-mingw64 -use-full-path';$s.WorkingDirectory=[Environment]::SystemDirectory;$s.WindowStyle=7;$s.IconLocation='C:\msys64\msys2.ico';$s.Save()" | |
rem make diffutils | |
compact /c /a /i /s | |
attrib +i /s /d | |
attrib +h . | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment