From 00696d13019aa6161d0884c79b4a7643b21862d6 Mon Sep 17 00:00:00 2001 From: Shravan Goswami <123811742+shravanngoswamii@users.noreply.github.com> Date: Sun, 22 Dec 2024 18:40:59 +0530 Subject: [PATCH 1/5] Update insert_navbar.sh --- assets/scripts/insert_navbar.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/scripts/insert_navbar.sh b/assets/scripts/insert_navbar.sh index 4e5e26df1..66599084e 100644 --- a/assets/scripts/insert_navbar.sh +++ b/assets/scripts/insert_navbar.sh @@ -18,8 +18,8 @@ fi # Directory containing HTML files HTML_DIR=$1 -# URL of the navigation bar HTML file -NAVBAR_URL=$2 +# Source of the navigation bar HTML file +NAVBAR_SOURCE=$2 # Shift off the first two arguments so we can parse the rest shift 2 @@ -51,7 +51,7 @@ fi # Check if the download was successful if [ -z "$NAVBAR_HTML" ]; then - echo "Failed to download navbar HTML from '$NAVBAR_URL'" + echo "Failed to download navbar HTML from '$NAVBAR_SOURCE'" exit 1 fi From de51d6a520e9556e01d43b6f7d73194a7a680140 Mon Sep 17 00:00:00 2001 From: Shravan Goswami <123811742+shravanngoswamii@users.noreply.github.com> Date: Sun, 22 Dec 2024 19:30:41 +0530 Subject: [PATCH 2/5] Update assets/scripts/insert_navbar.sh Co-authored-by: Hong Ge <3279477+yebai@users.noreply.github.com> --- assets/scripts/insert_navbar.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/scripts/insert_navbar.sh b/assets/scripts/insert_navbar.sh index 66599084e..4332d1545 100644 --- a/assets/scripts/insert_navbar.sh +++ b/assets/scripts/insert_navbar.sh @@ -18,7 +18,7 @@ fi # Directory containing HTML files HTML_DIR=$1 -# Source of the navigation bar HTML file +# Source URL of the navigation bar HTML file NAVBAR_SOURCE=$2 # Shift off the first two arguments so we can parse the rest shift 2 From f32a7ffd3e1c8845b01ae42f84fe32077d2c4ed3 Mon Sep 17 00:00:00 2001 From: Shravan Goswami <123811742+shravanngoswamii@users.noreply.github.com> Date: Sun, 22 Dec 2024 19:30:55 +0530 Subject: [PATCH 3/5] Update assets/scripts/insert_navbar.sh Co-authored-by: Hong Ge <3279477+yebai@users.noreply.github.com> --- assets/scripts/insert_navbar.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/scripts/insert_navbar.sh b/assets/scripts/insert_navbar.sh index 4332d1545..e6308bf64 100644 --- a/assets/scripts/insert_navbar.sh +++ b/assets/scripts/insert_navbar.sh @@ -19,7 +19,7 @@ fi # Directory containing HTML files HTML_DIR=$1 # Source URL of the navigation bar HTML file -NAVBAR_SOURCE=$2 +NAVBAR_SOURCE_URL=$2 # Shift off the first two arguments so we can parse the rest shift 2 From 3cd4fe62cd919e3af0875544fe9778a979638c4d Mon Sep 17 00:00:00 2001 From: Shravan Goswami <123811742+shravanngoswamii@users.noreply.github.com> Date: Sun, 22 Dec 2024 19:31:02 +0530 Subject: [PATCH 4/5] Update assets/scripts/insert_navbar.sh Co-authored-by: Hong Ge <3279477+yebai@users.noreply.github.com> --- assets/scripts/insert_navbar.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/scripts/insert_navbar.sh b/assets/scripts/insert_navbar.sh index e6308bf64..fa8c08cc3 100644 --- a/assets/scripts/insert_navbar.sh +++ b/assets/scripts/insert_navbar.sh @@ -51,7 +51,7 @@ fi # Check if the download was successful if [ -z "$NAVBAR_HTML" ]; then - echo "Failed to download navbar HTML from '$NAVBAR_SOURCE'" + echo "Failed to download navbar HTML from '$NAVBAR_SOURCE_URL'" exit 1 fi From b5d2a50faf652d5d260c51ec48cbb2551895381c Mon Sep 17 00:00:00 2001 From: Shravan Goswami <123811742+shravanngoswamii@users.noreply.github.com> Date: Sun, 22 Dec 2024 19:34:14 +0530 Subject: [PATCH 5/5] Update insert_navbar.sh --- assets/scripts/insert_navbar.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/scripts/insert_navbar.sh b/assets/scripts/insert_navbar.sh index fa8c08cc3..675b98ef4 100644 --- a/assets/scripts/insert_navbar.sh +++ b/assets/scripts/insert_navbar.sh @@ -43,10 +43,10 @@ while [[ $# -gt 0 ]]; do done # Determine if NAVBAR_SOURCE is a URL (starts with http or https) or a file path -if [[ $NAVBAR_SOURCE == http* ]]; then - NAVBAR_HTML=$(curl -s "$NAVBAR_SOURCE") +if [[ $NAVBAR_SOURCE_URL == http* ]]; then + NAVBAR_HTML=$(curl -s "$NAVBAR_SOURCE_URL") else - NAVBAR_HTML=$(cat "$NAVBAR_SOURCE") + NAVBAR_HTML=$(cat "$NAVBAR_SOURCE_URL") fi # Check if the download was successful