Skip to content

Instantly share code, notes, and snippets.

@hayleyxyz
Created June 7, 2019 23:13
Show Gist options
  • Save hayleyxyz/65477fcb554ec58193c47a0a29e4ce7e to your computer and use it in GitHub Desktop.
Save hayleyxyz/65477fcb554ec58193c47a0a29e4ce7e to your computer and use it in GitHub Desktop.
Install realpath on macOS using GNU coreutils
#!/bin/sh
curl https://ftp.gnu.org/gnu/coreutils/coreutils-8.31.tar.xz -O
tar xf coreutils-8.31.tar.xz
cd coreutils-8.31
./configure --enable-no-install-program=$(./build-aux/gen-lists-of-programs.sh --list-progs | tr '\n' ',' | sed -e 's/realpath,//' -e 's/,$//')
make
ln -s $(which install) src/ginstall # Hack because we didn't build GNU install, but make install requires it
echo "\nNow run 'make install' to install realpath\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment