Fix: file replacement in Watcharr Update Script (#2498)

This commit is contained in:
Andreas 2025-02-19 19:25:57 +00:00 committed by GitHub
parent d1e0c2d164
commit b293638c40
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,11 +37,12 @@ function update_script() {
msg_info "Updating $APP to v${RELEASE}"
temp_file=$(mktemp)
temp_folder=$(mktemp -d)
wget -q "https://github.com/sbondCo/Watcharr/archive/refs/tags/v${RELEASE}.tar.gz" -O "$temp_file"
tar -xzf "$temp_file"
tar -xzf "$temp_file" -C "$temp_folder"
rm -f /opt/watcharr/server/watcharr
rm -rf /opt/watcharr/server/ui
mv Watcharr-${RELEASE}/ /opt/watcharr
cp -rf ${temp_folder}/Watcharr-${RELEASE}/* /opt/watcharr
cd /opt/watcharr
export GOOS=linux
npm i &> /dev/null
@ -58,6 +59,7 @@ function update_script() {
msg_info "Cleaning Up"
rm -f ${temp_file}
rm -rf ${temp_folder}
msg_ok "Cleanup Completed"
echo "${RELEASE}" >/opt/${APP}_version.txt