diff --git a/scripts/install-proxmox-lxc.sh b/scripts/install-proxmox-lxc.sh index aa198b7..ac3fd58 100755 --- a/scripts/install-proxmox-lxc.sh +++ b/scripts/install-proxmox-lxc.sh @@ -382,7 +382,7 @@ rsync -a --delete \ \"\$repo_dir/\" \"\$web_root/\" while IFS= read -r -d '' html_file; do - perl -0pi -e 's{((?:href|src)=\")(?!https?://|data:|//)([^\"?]+?\.(?:css|js|png|jpg|jpeg|svg|webp|ico|pdf))(?:\?[^"]*)?(\")}{\$1 . \$2 . \"?v='"\"\$asset_version\""'\" . \$3}ge' \"\$html_file\" + ASSET_VERSION=\"\$asset_version\" perl -0pi -e 's{((?:href|src)=\")(?!https?://|data:|//)([^\"?]+?\.(?:css|js|png|jpg|jpeg|svg|webp|ico|pdf))(?:\?[^\"]*)?(\")}{\$1 . \$2 . \"?v=\" . \$ENV{ASSET_VERSION} . \$3}ge' \"\$html_file\" done < <(find \"\$web_root\" -maxdepth 1 -type f -name '*.html' -print0) chown -R www-data:www-data \"\$web_root\" diff --git a/scripts/update-proxmox-lxc.sh b/scripts/update-proxmox-lxc.sh index 60b5050..6984b17 100755 --- a/scripts/update-proxmox-lxc.sh +++ b/scripts/update-proxmox-lxc.sh @@ -203,7 +203,7 @@ rsync -a --delete \ \"\$repo_dir/\" \"\$web_root/\" while IFS= read -r -d '' html_file; do - perl -0pi -e 's{((?:href|src)=\")(?!https?://|data:|//)([^\"?]+?\.(?:css|js|png|jpg|jpeg|svg|webp|ico|pdf))(?:\?[^"]*)?(\")}{\$1 . \$2 . \"?v='"\"\$asset_version\""'\" . \$3}ge' \"\$html_file\" + ASSET_VERSION=\"\$asset_version\" perl -0pi -e 's{((?:href|src)=\")(?!https?://|data:|//)([^\"?]+?\.(?:css|js|png|jpg|jpeg|svg|webp|ico|pdf))(?:\?[^\"]*)?(\")}{\$1 . \$2 . \"?v=\" . \$ENV{ASSET_VERSION} . \$3}ge' \"\$html_file\" done < <(find \"\$web_root\" -maxdepth 1 -type f -name '*.html' -print0) chown -R www-data:www-data \"\$web_root\"