fix: gnu-sed isnt properly symlink to sed

This commit is contained in:
Cuynu 2025-07-06 14:41:48 +07:00
commit 8458cafe42
2 changed files with 10 additions and 8 deletions

View file

@ -26,14 +26,9 @@ else
mkdir ~/mbbpatch/MBCPApp/tools
fi
# Check if user runs on macOS environment
if [[ $OSTYPE == 'darwin'* ]]; then
echo "INFO : You have macOS environment :)"
./pathmac.sh
fi
# Check if user runs on actual Linux environment
if [[ $(grep -i Linux /proc/version) ]]; then
clear
echo "INFO : You have Linux environment :)"
fi
@ -69,6 +64,15 @@ else
JAVA=:
fi
# Check if user runs on macOS environment
if [[ $OSTYPE == 'darwin'* ]]; then
echo "INFO : You have macOS environment :)"
# x86_64 Intel/AMD macOS
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"
# arm64 Apple Silicon macOS
PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"
fi
# Banner
$FIGLET "MBCPApp Patcher"
echo -------------------------------------------------------------

View file

@ -1,10 +1,8 @@
if [[ $(uname -m) == 'arm64' ]]; then
PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"
sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
fi
if [[ $(uname -m) == 'x86_64' ]]; then
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"
sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
fi