Update redlib.sh

This commit is contained in:
Slaviša Arežina 2025-08-22 17:50:51 +02:00 committed by Andrej Kocijan
parent b39235d15e
commit 982b222128
No known key found for this signature in database

View File

@ -38,18 +38,12 @@ function update_script() {
$STD rc-service redlib stop $STD rc-service redlib stop
msg_ok "Stopped ${APP} Service" msg_ok "Stopped ${APP} Service"
msg_info "Updating ${APP}" fetch_and_deploy_gh_release "redlib" "redlib-org/redlib" "prebuild" "latest" "/opt/redlib" "redlib-x86_64-unknown-linux-musl.tar.gz"
$STD curl -fsSL -o /tmp/redlib-x86_64-unknown-linux-musl.tar.gz \
"https://github.com/redlib-org/redlib/releases/latest/download/redlib-x86_64-unknown-linux-musl.tar.gz"
$STD tar -xzf /tmp/redlib-x86_64-unknown-linux-musl.tar.gz -C /opt/redlib
$STD rm /tmp/redlib-x86_64-unknown-linux-musl.tar.gz
msg_ok "Updated ${APP}"
msg_info "Starting ${APP} Service" msg_info "Starting ${APP} Service"
$STD rc-service redlib start $STD rc-service redlib start
msg_ok "Started ${APP} Service" msg_ok "Started ${APP} Service"
echo "${RELEASE}" >~/.redlib
msg_ok "Update Successful" msg_ok "Update Successful"
else else
msg_ok "No update required. ${APP} is already at ${RELEASE}" msg_ok "No update required. ${APP} is already at ${RELEASE}"