Update fetch_and_deploy function (#4605)

This commit is contained in:
Slaviša Arežina 2025-05-20 13:05:02 +02:00 committed by GitHub
parent 3814e51d3f
commit a39354f8f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -783,9 +783,13 @@ fetch_and_deploy_gh_release() {
local content_root local content_root
content_root=$(find "$tmpdir" -mindepth 1 -maxdepth 1 -type d) content_root=$(find "$tmpdir" -mindepth 1 -maxdepth 1 -type d)
if [[ $(echo "$content_root" | wc -l) -eq 1 ]]; then if [[ $(echo "$content_root" | wc -l) -eq 1 ]]; then
shopt -s dotglob nullglob
cp -r "$content_root"/* "/opt/$app/" cp -r "$content_root"/* "/opt/$app/"
shopt -u dotglob nullglob
else else
shopt -s dotglob nullglob
cp -r "$tmpdir"/* "/opt/$app/" cp -r "$tmpdir"/* "/opt/$app/"
shopt -u dotglob nullglob
fi fi
echo "$version" >"/opt/${app}_version.txt" echo "$version" >"/opt/${app}_version.txt"
$STD msg_ok "Deployed $app v$version to /opt/$app" $STD msg_ok "Deployed $app v$version to /opt/$app"