From 68ebd08205b5fef663fbf33bd4d833a7eea93b6f Mon Sep 17 00:00:00 2001 From: GermanBread Date: Mon, 3 May 2021 22:04:05 +0200 Subject: [PATCH 1/5] Useful stuff --- LULI.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/LULI.sh b/LULI.sh index 60c58a0..d705956 100644 --- a/LULI.sh +++ b/LULI.sh @@ -62,20 +62,34 @@ Error() { } if [ "$TERM" = dumb ]; then - exit + exit 0 fi if [ $(id -u) -eq 0 ]; then Error "Don't run this script as root" - exit + exit 0 fi # Check if unzip is installed -if [ ! -e /usr/bin/unzip ]; then - Warning "Unzip does not seem to be installed!\n\tThis script depends on this package.\n\tInstall unzip and restart this script.\n\tPress enter if you believe that this is a false-positive." +if [ ! -e /bin/unzip ]; then + Warning "Unzip does not seem to be installed!\n\tThis script depends on this package.\n\tInstall unzip and restart this script." + Info "Press enter if you believe that this is a false-positive." read -r REPLY fi +# Library checks (should prevent issues like https://github.com/Lightcord/Lightcord/issues/240) +if [ ! -e /lib/libnspr4.so ] || [ ! -e /lib/libnss3.so ]; then + Warning "Some required libraries seem to not be installed!\n\tMake sure that both 'libnspr4.so' and 'libnss3.so' are present in '/lib'" + Info "Press enter if you believe that this is a false-positive." + read -r REPLY +fi + +# Bedrock Linux warning +if [ -d /bedrock ]; then + Info "Detected Bedrock Linux." + SubInfo "This script is executed in the $(tput bold && brl which && tput sgr0 && tput setaf 8) stratum. Mention this when filing a bug report!" +fi + cat << "logo_end" _ _ _ _ _ | | (_)__ _| |_| |_ __ ___ _ _ __| | From 52f16d89a62639777f87831e09b14285b81874d9 Mon Sep 17 00:00:00 2001 From: GermanBread Date: Mon, 3 May 2021 22:06:13 +0200 Subject: [PATCH 2/5] Remove newline... --- LULI.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LULI.sh b/LULI.sh index d705956..82b231d 100644 --- a/LULI.sh +++ b/LULI.sh @@ -87,7 +87,7 @@ fi # Bedrock Linux warning if [ -d /bedrock ]; then Info "Detected Bedrock Linux." - SubInfo "This script is executed in the $(tput bold && brl which && tput sgr0 && tput setaf 8) stratum. Mention this when filing a bug report!" + SubInfo "This script is executed in the $(tput bold && brl which | tr -d '\n' && tput sgr0 && tput setaf 8) stratum. Mention this when filing a bug report!" fi cat << "logo_end" From c702b509532ac39e4bee441cf525cc8bb85423b0 Mon Sep 17 00:00:00 2001 From: GermanBread Date: Mon, 3 May 2021 22:09:11 +0200 Subject: [PATCH 3/5] smol change commit spam lol? --- LULI.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LULI.sh b/LULI.sh index 82b231d..dfe09ea 100644 --- a/LULI.sh +++ b/LULI.sh @@ -87,7 +87,7 @@ fi # Bedrock Linux warning if [ -d /bedrock ]; then Info "Detected Bedrock Linux." - SubInfo "This script is executed in the $(tput bold && brl which | tr -d '\n' && tput sgr0 && tput setaf 8) stratum. Mention this when filing a bug report!" + SubInfo "This script is executed in the $(tput bold && tput setaf 15 && brl which | tr -d '\n') stratum$(tput sgr0 && tput setaf 8). Mention this when filing a bug report!" fi cat << "logo_end" From fb5031fe217b16fa91dbbeeaa56fd76834c3e947 Mon Sep 17 00:00:00 2001 From: GermanBread Date: Mon, 3 May 2021 22:24:28 +0200 Subject: [PATCH 4/5] install instructions --- LULI.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/LULI.sh b/LULI.sh index dfe09ea..7426d79 100644 --- a/LULI.sh +++ b/LULI.sh @@ -80,6 +80,12 @@ fi # Library checks (should prevent issues like https://github.com/Lightcord/Lightcord/issues/240) if [ ! -e /lib/libnspr4.so ] || [ ! -e /lib/libnss3.so ]; then Warning "Some required libraries seem to not be installed!\n\tMake sure that both 'libnspr4.so' and 'libnss3.so' are present in '/lib'" + if [ -e /bin/pacman ]; then + SubInfo "$(tput setaf 12 && tput bold)Arch Linux or Arch-based$(tput sgr0 && tput setaf 15) sudo pacman -S nss nspr" + fi + if [ -e /bin/apt ]; then + SubInfo "$(tput setaf 13 && tput bold)Debian or Debian-based$(tput sgr0 && tput setaf 15) sudo apt install libnspr4 libnss3" + fi Info "Press enter if you believe that this is a false-positive." read -r REPLY fi From de58a38d723edc60e5d7df523d24f5734fd68eb2 Mon Sep 17 00:00:00 2001 From: GermanBread Date: Mon, 3 May 2021 22:30:20 +0200 Subject: [PATCH 5/5] Finalise --- LULI.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/LULI.sh b/LULI.sh index 7426d79..46ab168 100644 --- a/LULI.sh +++ b/LULI.sh @@ -70,6 +70,12 @@ if [ $(id -u) -eq 0 ]; then exit 0 fi +# Bedrock Linux warning +if [ -d /bedrock ]; then + Info "Bedrock Linux detected. Here be dragons..." + SubInfo "This script is executed in the $(tput bold && tput setaf 15 && brl which | tr -d '\n') stratum$(tput sgr0 && tput setaf 8). Mention this when filing a bug report!" +fi + # Check if unzip is installed if [ ! -e /bin/unzip ]; then Warning "Unzip does not seem to be installed!\n\tThis script depends on this package.\n\tInstall unzip and restart this script." @@ -90,12 +96,6 @@ if [ ! -e /lib/libnspr4.so ] || [ ! -e /lib/libnss3.so ]; then read -r REPLY fi -# Bedrock Linux warning -if [ -d /bedrock ]; then - Info "Detected Bedrock Linux." - SubInfo "This script is executed in the $(tput bold && tput setaf 15 && brl which | tr -d '\n') stratum$(tput sgr0 && tput setaf 8). Mention this when filing a bug report!" -fi - cat << "logo_end" _ _ _ _ _ | | (_)__ _| |_| |_ __ ___ _ _ __| |