From 2d24709bb975e10bb4c93cd3895300e07b6025a5 Mon Sep 17 00:00:00 2001 From: MBCPApp Author Date: Fri, 2 May 2025 08:36:03 -0700 Subject: [PATCH] improvements --- MBCPApp/mbcpapp.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/MBCPApp/mbcpapp.sh b/MBCPApp/mbcpapp.sh index 94ff79b..a7986ba 100755 --- a/MBCPApp/mbcpapp.sh +++ b/MBCPApp/mbcpapp.sh @@ -1,5 +1,14 @@ #!/bin/bash +# Check if user trying to run under HyperV (Windows Subsystem For Linux) +# Remove this detection part to bypass WSL detection might lead project development to be STOPPED, You've warned ! +if [ -f /proc/sys/fs/binfmt_misc/WSLInterop ]; then +echo "Detected WSL (Windows Subsystem for Linux) in current Linux environment !!" +echo "INFO : MBCPApp Patcher must be run on actual or virtualized (non-WSL) Linux environment instead of WSL" +echo "INFO : Trying to remove WSL detection code might make script not works properly and impact to project development due to being run on non-freedom environment !!!" +exit +fi + # Initial startup if [ -d ~/mbbpatch/MBCPApp/mbapk ] then @@ -21,14 +30,6 @@ else mkdir ~/mbbpatch/MBCPApp/tools fi -# Check if user trying to run under HyperV (Windows Subsystem For Linux) -if [ -f /proc/sys/fs/binfmt_misc/WSLInterop ]; then -echo "Detected WSL (Windows Subsystem for Linux) in current Linux environment !!" -echo "INFO : MBCPApp Patcher must be run on actual or virtualized (non-WSL) Linux environment instead of WSL" -echo "INFO : Trying to remove WSL detection code might make script not works properly and impact to project development due to being run on non-freedom environment !!!" -exit -fi - # Check if user runs on actual Linux environment if [[ $(grep -i Linux /proc/version) ]]; then echo "INFO : You have Linux environment :)"