From 5f478d36e9c4aaf9cb941a5453cc715051c2f48d Mon Sep 17 00:00:00 2001 From: Infev <67120154+infevlol@users.noreply.github.com> Date: Sat, 20 Aug 2022 11:25:48 +0200 Subject: [PATCH 1/2] fixed some typos --- cloaks.bat | 18 +++++++++--------- cloaks.sh | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/cloaks.bat b/cloaks.bat index 378ff41..538f181 100644 --- a/cloaks.bat +++ b/cloaks.bat @@ -22,13 +22,13 @@ GOTO intro REM Let the user know the options they have ECHO Type one of the following (use the number) ECHO 1) Install (Install Cloaks+ on this computer) - ECHO 2) UnInstall (Remove Cloaks+ from the computer) + ECHO 2) Uninstall (Remove Cloaks+ from the computer) ECHO 3) Exit (Close this application) REM Take in user input and store it as %OPTION% SET /p choice=Type the number representing an option: if '%choice%'=='' ( - ECHO "%choice%" is not valid please try again + ECHO "%choice%" is not valid, please try again. GOTO options ) if '%choice%'=='1' GOTO install @@ -37,19 +37,19 @@ GOTO intro :permissions REM This attempts to add a registry key (This will fail without admin rights) - REM the key already exists so will not be affected + REM The key already exists so it will not be affected REG ADD HKLM /F>nul 2>&1 if %ERRORLEVEL% == 0 ( REM The user has admin permissions and can continue GOTO options ) else ( - REM The user does not have admin perms give them an error message + REM The user does not have admin permissions, give them an error message ECHO --------------------------------------------------------- ECHO NO ADMIN PERMISSIONS ECHO --------------------------------------------------------- - ECHO You did not run this with Admin permissions please run - ECHO it again but with Admin permission. To do so right click - ECHO this file and click "Run as administrator" + ECHO You did not run this with Admin permissions, please run + ECHO it again but with Admin permissions. To do so right click + ECHO this file and click "Run as administrator". REM Pausing execution so the user can read the message PAUSE EXIT @@ -63,7 +63,7 @@ GOTO intro ECHO 159.203.120.188 s.optifine.net # INSERTED BY CLOAKS+ >> "%TEMP_HOSTS_FILE%" REM Replace the Hosts file with the Temp file COPY /b/v/y "%TEMP_HOSTS_FILE%" "%HOSTS_FILE%" - ECHO Install Complete + ECHO Install has been completed REM Pausing execution so the user can read the message PAUSE EXIT @@ -74,7 +74,7 @@ GOTO intro FINDSTR /V "159.203.120.188 s.optifine.net # INSERTED BY CLOAKS+" "%HOSTS_FILE%" > "%TEMP_HOSTS_FILE%" REM Replace the Hosts file with the Temp file COPY /b/v/y "%TEMP_HOSTS_FILE%" "%HOSTS_FILE%" - ECHO UnInstall Complete + ECHO Uninstall has been completed REM Pausing execution so the user can read the message PAUSE EXIT \ No newline at end of file diff --git a/cloaks.sh b/cloaks.sh index 2031cec..5d8f5be 100644 --- a/cloaks.sh +++ b/cloaks.sh @@ -9,7 +9,7 @@ REDIRECT_DOMAIN="s.optifine.net" # The value to be inserted into the hosts file INSERT_VALUE="$IP $REDIRECT_DOMAIN" # The argument provided by the user -OPTION=${1?You need to provide an option! please provide --install or --uninstall as an argument} +OPTION=${1?You need to provide an option! Please provide --install or --uninstall as an argument.} if [ "$OPTION" = "--install" ]; then if grep -q "$INSERT_VALUE" "$HOSTS_FILE"; then @@ -28,13 +28,13 @@ elif [ "$OPTION" = "--uninstall" ]; then echo "Removing cloaks+" sudo sed -i".bak" "/$INSERT_VALUE/d" $HOSTS_FILE if grep -q "$INSERT_VALUE" "$HOSTS_FILE"; then - echo "Failed to remove cloaks+"; + echo "Failed to remove Cloaks+"; else - echo "Successfully removed cloaks+" + echo "Successfully removed Cloaks+" fi else echo "Cloaks+ is not installed 1" fi else - echo "Unknown option please use '--install' or '--uninstall'." + echo "Unknown option, please use '--install' or '--uninstall'." fi \ No newline at end of file From ac9efe5689b36ece67fdc4d0c7648a4245428292 Mon Sep 17 00:00:00 2001 From: Infev <67120154+infevlol@users.noreply.github.com> Date: Sat, 20 Aug 2022 11:31:18 +0200 Subject: [PATCH 2/2] fixed line endings in sh file --- cloaks.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cloaks.sh b/cloaks.sh index 5d8f5be..87b8584 100644 --- a/cloaks.sh +++ b/cloaks.sh @@ -2,9 +2,9 @@ # The path to the linux host file HOSTS_FILE=/etc/hosts -# The IP address for cloaks+ +# The IP address for Cloaks+ IP="159.203.120.188" -# The domain to redirect to cloaks+ +# The domain to redirect to Cloaks+ REDIRECT_DOMAIN="s.optifine.net" # The value to be inserted into the hosts file INSERT_VALUE="$IP $REDIRECT_DOMAIN" @@ -20,12 +20,12 @@ if [ "$OPTION" = "--install" ]; then if grep -q "$INSERT_VALUE" "$HOSTS_FILE"; then echo "Cloaks+ was successfully installed"; else - echo "Failed to install cloaks+" + echo "Failed to install Cloaks+." fi fi elif [ "$OPTION" = "--uninstall" ]; then if grep -q "$INSERT_VALUE" "$HOSTS_FILE"; then - echo "Removing cloaks+" + echo "Removing Cloaks+" sudo sed -i".bak" "/$INSERT_VALUE/d" $HOSTS_FILE if grep -q "$INSERT_VALUE" "$HOSTS_FILE"; then echo "Failed to remove Cloaks+";