From eb4cca8946535e6a0656e3de43d553af0413dce7 Mon Sep 17 00:00:00 2001 From: Nyx <144965845+nnyyxxxx@users.noreply.github.com> Date: Wed, 18 Sep 2024 20:40:25 -0400 Subject: [PATCH] Change echo to printf in gaming and security (#484) Co-authored-by: nnyyxxxx --- tabs/gaming/diablo-ii/d2r-loot-filters.sh | 23 ++++++++++------------- tabs/security/firewall-baselines.sh | 4 ++-- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/tabs/gaming/diablo-ii/d2r-loot-filters.sh b/tabs/gaming/diablo-ii/d2r-loot-filters.sh index 8112a995..9534108d 100755 --- a/tabs/gaming/diablo-ii/d2r-loot-filters.sh +++ b/tabs/gaming/diablo-ii/d2r-loot-filters.sh @@ -12,7 +12,7 @@ if [ -z "$possible_paths" ]; then fi # Display possible paths and allow selection -echo "Possible Diablo II Resurrected folder locations:" +printf "%b\n" "${YELLOW}Possible Diablo II Resurrected folder locations:${RC}" mapfile -t paths_array <<< "$possible_paths" selected=0 total=${#paths_array[@]} @@ -77,7 +77,7 @@ select_path # Validate the path if [ ! -d "$d2r_path" ]; then - echo "Error: The specified path does not exist." + printf "%b\n" "${RED}Error: The specified path does not exist.${RC}" exit 1 fi @@ -98,14 +98,11 @@ rm /tmp/lootfilter.zip printf "%b\n" "${GREEN}Loot filter installed successfully in $mods_path${RC}" -# Add instructions for setting launch options -echo -echo "To complete the setup, please follow these steps to add launch options in Battle.net:" -echo "1. Open the Battle.net launcher" -echo "2. Select Diablo II: Resurrected" -echo "3. Click the gear icon next to the 'Play' button" -echo "4. Select 'Game Settings'" -echo "5. In the 'Additional command line arguments' field, enter: -mod lootfilter -txt" -echo "6. Click 'Done' to save the changes" -echo -echo "After completing these steps, launch Diablo II: Resurrected through Battle.net to use the loot filter." \ No newline at end of file +printf "\nTo complete the setup, please follow these steps to add launch options in Battle.net:\n" +printf "1. Open the Battle.net launcher\n" +printf "2. Select Diablo II: Resurrected\n" +printf "3. Click the gear icon next to the 'Play' button\n" +printf "4. Select 'Game Settings'\n" +printf "5. In the 'Additional command line arguments' field, enter: -mod lootfilter -txt\n" +printf "6. Click 'Done' to save the changes\n" +printf "\nAfter completing these steps, launch Diablo II: Resurrected through Battle.net to use the loot filter.\n" \ No newline at end of file diff --git a/tabs/security/firewall-baselines.sh b/tabs/security/firewall-baselines.sh index 196428be..2f7a2529 100644 --- a/tabs/security/firewall-baselines.sh +++ b/tabs/security/firewall-baselines.sh @@ -3,7 +3,7 @@ . ../common-script.sh installPkg() { - echo "Installing UFW..." + printf "%b\n" "${YELLOW}Installing UFW...${RC}" if ! command_exists ufw; then case "$PACKAGER" in pacman) @@ -14,7 +14,7 @@ installPkg() { ;; esac else - echo "UFW is already installed." + printf "%b\n" "${GREEN}UFW is already installed${RC}" fi }