mirror of
https://github.com/Smaug123/nix-dotfiles
synced 2025-10-13 02:18:42 +00:00
16 lines
390 B
Bash
16 lines
390 B
Bash
#!/bin/bash
|
|
|
|
dest="/usr/local/opt/gmp/lib/libgmp.10.dylib"
|
|
sudo mkdir -p "$(dirname "$dest")"
|
|
existing=$(readlink "$dest")
|
|
if [ $? -eq 1 ]; then
|
|
sudo ln -s "NIX-GMP/lib/libgmp.10.dylib" "$dest"
|
|
else
|
|
if [[ "$existing" == /nix/store/* ]]; then
|
|
sudo ln -fs "NIX-GMP/lib/libgmp.10.dylib" "$dest"
|
|
else
|
|
echo "Existing symlink is $existing, refusing to overwrite"
|
|
exit 1
|
|
fi
|
|
fi
|