Created
April 5, 2024 13:57
-
-
Save rfay/fa03d8ef4878e5623627896a9546e227 to your computer and use it in GitHub Desktop.
ddev symlinking scripts
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/bash | |
# Go back to homebrew stable version of DDEV | |
set -x | |
set -o errexit | |
rm -f /usr/local/bin/ddev /opt/homebrew/bin/ddev || sudo rm -f /usr/local/bin/ddev /opt/homebrew/bin/ddev | |
if [ -d /opt/homebrew/bin ]; then | |
ln -sf /opt/homebrew/bin/ddev /usr/local/bin/ddev | |
fi | |
(brew unlink ddev/ddev/ddev || true) && brew link ddev/ddev/ddev || brew install ddev/ddev/ddev |
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/bash | |
# Link current compiled version of DDEV | |
set -x | |
set -o errexit | |
#if command -v brew; then | |
#brew unlink ddev || true | |
#fi | |
SUDO="" | |
if [ ! -w /usr/local/bin ] || [ ! -w /usr/local/bin/ddev ]; then | |
SUDO="sudo " | |
fi | |
${SUDO} ln -sf /usr/local/bin/ddev.link /usr/local/bin/ddev | |
hash -r |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment