From 24a5442e449bb338013cf14c1d83c6eb00a3983d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Apr 2025 11:18:12 +0200 Subject: [PATCH] fix golang issue --- ct/watcharr.sh | 4 ++-- install/authentik-install.sh | 2 +- install/caddy-install.sh | 6 +++--- install/memos-install.sh | 2 +- install/ollama-install.sh | 2 +- install/paperless-gpt-install.sh | 2 +- install/pocketid-install.sh | 2 +- install/rtsptoweb-install.sh | 2 +- install/seelf-install.sh | 2 +- install/sftpgo-install.sh | 4 ++-- install/watcharr-install.sh | 6 +++--- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/ct/watcharr.sh b/ct/watcharr.sh index 34969189e..973f577bb 100644 --- a/ct/watcharr.sh +++ b/ct/watcharr.sh @@ -38,7 +38,7 @@ function update_script() { msg_info "Updating $APP to v${RELEASE}" temp_file=$(mktemp) temp_folder=$(mktemp -d) -curl -fsSL "https://github.com/sbondCo/Watcharr/archive/refs/tags/v${RELEASE}.tar.gz" -o ""$temp_file"" + curl -fsSL "https://github.com/sbondCo/Watcharr/archive/refs/tags/v${RELEASE}.tar.gz" -o ""$temp_file"" tar -xzf "$temp_file" -C "$temp_folder" rm -f /opt/watcharr/server/watcharr rm -rf /opt/watcharr/server/ui @@ -77,4 +77,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3080${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3080${CL}" diff --git a/install/authentik-install.sh b/install/authentik-install.sh index 5d288ad66..983c4b767 100644 --- a/install/authentik-install.sh +++ b/install/authentik-install.sh @@ -82,7 +82,7 @@ msg_info "Installing Golang" set +o pipefail temp_file=$(mktemp) golang_tarball=$(curl -fsSL https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1) -curl -fsSL "https://golang.org/dl/"$golang_tarball" -o ""$temp_file"" +curl -fsSL "https://golang.org/dl/${golang_tarball}" -o "$temp_file" tar -C /usr/local -xzf "$temp_file" ln -sf /usr/local/go/bin/go /usr/local/bin/go rm -f "$temp_file" diff --git a/install/caddy-install.sh b/install/caddy-install.sh index fb339f64b..5f488797f 100644 --- a/install/caddy-install.sh +++ b/install/caddy-install.sh @@ -34,7 +34,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then set +o pipefail temp_file=$(mktemp) golang_tarball=$(curl -fsSL https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1) -curl -fsSL "https://golang.org/dl/"$golang_tarball" -o ""$temp_file"" + curl -fsSL "https://golang.org/dl/${golang_tarball}" -o "$temp_file" tar -C /usr/local -xzf "$temp_file" ln -sf /usr/local/go/bin/go /usr/local/bin/go rm -f "$temp_file" @@ -44,7 +44,7 @@ curl -fsSL "https://golang.org/dl/"$golang_tarball" -o ""$temp_file"" msg_info "Setup xCaddy" cd /opt RELEASE=$(curl -fsSL https://api.github.com/repos/caddyserver/xcaddy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -curl -fsSL "https://github.com/caddyserver/xcaddy/releases/download/${RELEASE}/xcaddy_${RELEASE:1}_linux_amd64.deb" -o $(basename "https://github.com/caddyserver/xcaddy/releases/download/${RELEASE}/xcaddy_${RELEASE:1}_linux_amd64.deb") + curl -fsSL "https://github.com/caddyserver/xcaddy/releases/download/${RELEASE}/xcaddy_${RELEASE:1}_linux_amd64.deb" -o $(basename "https://github.com/caddyserver/xcaddy/releases/download/${RELEASE}/xcaddy_${RELEASE:1}_linux_amd64.deb") $STD dpkg -i xcaddy_${RELEASE:1}_linux_amd64.deb rm -rf /opt/xcaddy* $STD xcaddy build @@ -57,4 +57,4 @@ customize msg_info "Cleaning up" $STD apt-get -y autoremove $STD apt-get -y autoclean -msg_ok "Cleaned" \ No newline at end of file +msg_ok "Cleaned" diff --git a/install/memos-install.sh b/install/memos-install.sh index 5b0b018e2..26cc16013 100644 --- a/install/memos-install.sh +++ b/install/memos-install.sh @@ -40,7 +40,7 @@ msg_info "Installing Golang" set +o pipefail temp_file=$(mktemp) golang_tarball=$(curl -fsSL https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1) -curl -fsSL "https://golang.org/dl/"$golang_tarball" -o ""$temp_file"" +curl -fsSL "https://golang.org/dl/${golang_tarball}" -o "$temp_file" tar -C /usr/local -xzf "$temp_file" ln -sf /usr/local/go/bin/go /usr/local/bin/go rm -f "$temp_file" diff --git a/install/ollama-install.sh b/install/ollama-install.sh index 8cf97f6dd..ff093aa95 100644 --- a/install/ollama-install.sh +++ b/install/ollama-install.sh @@ -26,7 +26,7 @@ msg_info "Installing Golang" set +o pipefail temp_file=$(mktemp) golang_tarball=$(curl -fsSL https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1) -curl -fsSL "https://golang.org/dl/"$golang_tarball" -o ""$temp_file"" +curl -fsSL "https://golang.org/dl/${golang_tarball}" -o "$temp_file" tar -C /usr/local -xzf "$temp_file" ln -sf /usr/local/go/bin/go /usr/local/bin/go rm -f "$temp_file" diff --git a/install/paperless-gpt-install.sh b/install/paperless-gpt-install.sh index 892f93c13..00e195fa6 100644 --- a/install/paperless-gpt-install.sh +++ b/install/paperless-gpt-install.sh @@ -39,7 +39,7 @@ msg_info "Installing Golang" set +o pipefail temp_file=$(mktemp) golang_tarball=$(curl -fsSL https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1) -curl -fsSL "https://golang.org/dl/"$golang_tarball" -o ""$temp_file"" +curl -fsSL "https://golang.org/dl/${golang_tarball}" -o "$temp_file" tar -C /usr/local -xzf "$temp_file" ln -sf /usr/local/go/bin/go /usr/local/bin/go rm -f "$temp_file" diff --git a/install/pocketid-install.sh b/install/pocketid-install.sh index 0845436ee..47e8f8f7e 100644 --- a/install/pocketid-install.sh +++ b/install/pocketid-install.sh @@ -35,7 +35,7 @@ msg_info "Installing Golang" set +o pipefail temp_file=$(mktemp) golang_tarball=$(curl -fsSL https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1) -curl -fsSL "https://golang.org/dl/"$golang_tarball" -o ""$temp_file"" +curl -fsSL "https://golang.org/dl/${golang_tarball}" -o "$temp_file" tar -C /usr/local -xzf "$temp_file" ln -sf /usr/local/go/bin/go /usr/local/bin/go rm -f "$temp_file" diff --git a/install/rtsptoweb-install.sh b/install/rtsptoweb-install.sh index e096231df..ecbb97918 100644 --- a/install/rtsptoweb-install.sh +++ b/install/rtsptoweb-install.sh @@ -21,7 +21,7 @@ msg_info "Installing Golang" set +o pipefail temp_file=$(mktemp) golang_tarball=$(curl -fsSL https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1) -curl -fsSL "https://golang.org/dl/"$golang_tarball" -o ""$temp_file"" +curl -fsSL "https://golang.org/dl/${golang_tarball}" -o "$temp_file" tar -C /usr/local -xzf "$temp_file" ln -sf /usr/local/go/bin/go /usr/local/bin/go rm -f "$temp_file" diff --git a/install/seelf-install.sh b/install/seelf-install.sh index e45e5dd25..e4cb6e19f 100644 --- a/install/seelf-install.sh +++ b/install/seelf-install.sh @@ -23,7 +23,7 @@ msg_info "Installing Golang" set +o pipefail temp_file=$(mktemp) golang_tarball=$(curl -fsSL https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1) -curl -fsSL "https://golang.org/dl/"$golang_tarball" -o ""$temp_file"" +curl -fsSL "https://golang.org/dl/${golang_tarball}" -o "$temp_file" tar -C /usr/local -xzf "$temp_file" ln -sf /usr/local/go/bin/go /usr/local/bin/go set -o pipefail diff --git a/install/sftpgo-install.sh b/install/sftpgo-install.sh index c0b0fc188..c21fc11d9 100644 --- a/install/sftpgo-install.sh +++ b/install/sftpgo-install.sh @@ -22,7 +22,7 @@ msg_info "Installing Golang" set +o pipefail temp_file=$(mktemp) golang_tarball=$(curl -fsSL https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1) -curl -fsSL "https://golang.org/dl/"$golang_tarball" -o ""$temp_file"" +curl -fsSL "https://golang.org/dl/${golang_tarball}" -o "$temp_file" tar -C /usr/local -xzf "$temp_file" ln -sf /usr/local/go/bin/go /usr/local/bin/go rm -f "$temp_file" @@ -42,4 +42,4 @@ customize msg_info "Cleaning up" $STD apt-get -y autoremove $STD apt-get -y autoclean -msg_ok "Cleaned" \ No newline at end of file +msg_ok "Cleaned" diff --git a/install/watcharr-install.sh b/install/watcharr-install.sh index fb046ce39..4a85cffba 100644 --- a/install/watcharr-install.sh +++ b/install/watcharr-install.sh @@ -23,7 +23,7 @@ msg_info "Setup Golang" set +o pipefail temp_file=$(mktemp) golang_tarball=$(curl -fsSL https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1) -curl -fsSL "https://golang.org/dl/"$golang_tarball" -o ""$temp_file"" +curl -fsSL "https://golang.org/dl/${golang_tarball}" -o "$temp_file" tar -C /usr/local -xzf "$temp_file" ln -sf /usr/local/go/bin/go /usr/local/bin/go rm -f "$temp_file" @@ -41,7 +41,7 @@ msg_ok "Setup Node.js" msg_info "Setup Watcharr" temp_file=$(mktemp) RELEASE=$(curl -fsSL https://api.github.com/repos/sbondCo/Watcharr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/sbondCo/Watcharr/archive/refs/tags/v${RELEASE}.tar.gz" -o ""$temp_file"" +curl -fsSL "https://github.com/sbondCo/Watcharr/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file" tar -xzf "$temp_file" mv Watcharr-${RELEASE}/ /opt/watcharr cd /opt/watcharr @@ -87,4 +87,4 @@ msg_info "Cleaning up" rm -f "$temp_file" $STD apt-get -y autoremove $STD apt-get -y autoclean -msg_ok "Cleaned" \ No newline at end of file +msg_ok "Cleaned"