From e222b5232eae2c698569a0e9229be7aaae7d868c Mon Sep 17 00:00:00 2001 From: Lawrence Lagerlof Date: Sat, 17 Sep 2022 12:45:29 -0300 Subject: [PATCH 1/3] Removed duplicated chmod in install.sh --- install.sh | 2 -- 1 file changed, 2 deletions(-) mode change 100644 => 100755 install.sh diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 index d1e4042..976b46a --- a/install.sh +++ b/install.sh @@ -73,8 +73,6 @@ fi rm -f /tmp/h-m-m # Make the copied file executable -sudo chmod +x $DESTINATION_DIR/h-m-m - if ! sudo chmod +x $DESTINATION_DIR/h-m-m; then printf "ERROR: Could not make the script %s/h-m-m executable.\n" "$DESTINATION_DIR" exit 1 From 51aaa2ec5745be7120131651588cc86d3efd5f24 Mon Sep 17 00:00:00 2001 From: Lawrence Lagerlof Date: Sat, 17 Sep 2022 12:47:47 -0300 Subject: [PATCH 2/3] Removed some unnecessary quotes from install.sh --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 976b46a..7c9fc46 100755 --- a/install.sh +++ b/install.sh @@ -6,13 +6,13 @@ DESTINATION_DIR=/usr/local/bin # Test if /usr/local/bin exists. If not fallback to /usr/bin if [ ! -d "$DESTINATION_DIR" ]; then - DESTINATION_DIR="/usr/bin" + DESTINATION_DIR=/usr/bin fi # If h-m-m doesn't exist in the same directory as this script, tries to download from github repository if [ ! -f "$HMM_PATH" ]; then if [ "$(curl --write-out '%{http_code}' --silent https://raw.githubusercontent.com/nadrad/h-m-m/main/h-m-m --output /tmp/h-m-m)" = "200" ]; then - HMM_PATH="/tmp/h-m-m" + HMM_PATH=/tmp/h-m-m else printf "ERROR: Could not download h-m-m\n" exit 1 From a5ed41fd54ed0a52e50c34978b63954583bd225b Mon Sep 17 00:00:00 2001 From: Lawrence Lagerlof Date: Sat, 17 Sep 2022 12:51:53 -0300 Subject: [PATCH 3/3] Added quotes to $DESTINATION_DIR in install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 7c9fc46..a4596f5 100755 --- a/install.sh +++ b/install.sh @@ -73,7 +73,7 @@ fi rm -f /tmp/h-m-m # Make the copied file executable -if ! sudo chmod +x $DESTINATION_DIR/h-m-m; then +if ! sudo chmod +x "$DESTINATION_DIR/h-m-m"; then printf "ERROR: Could not make the script %s/h-m-m executable.\n" "$DESTINATION_DIR" exit 1 fi