Last active
May 27, 2024 01:07
-
-
Save zeevro/515e85fdebdd1168490e18f9014c1ddb to your computer and use it in GitHub Desktop.
Build grep for Windows
This file contains hidden or 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
#!/bin/sh | |
latest=$(curl -sL https://ftpmirror.gnu.org/grep/ | grep -oE 'grep-[0-9]+\.[0-9]+(\.[0-9]+)?' | sort | tail -n 1) | |
wget "https://ftpmirror.gnu.org/grep/${latest}.tar.gz" | |
tar -xf "${latest}.tar.gz" | |
cd $latest | |
LDFLAGS=/usr/x86_64-w64-mingw32/lib/CRT_glob.o ./configure --target=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --build=x86_64-linux-gnu --enable-threads=windows | |
make -j$(nproc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment