fix: Refactor filename function

This commit is contained in:
Kroese 2025-10-02 17:00:46 +02:00 committed by GitHub
parent e2c323ff43
commit 70380d8cfc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -127,8 +127,9 @@ startInstall() {
if [[ "${VERSION,,}" == "http"* ]]; then
file=$(basename "${VERSION%%\?*}")
: "${file//+/ }"; printf -v file '%b' "${_//%/\\x}"
file=$(echo "$file" | sed -e 's/[^A-Za-z0-9._-]/_/g')
file="${file//+/ }"
printf -v file '%b' "${file//%/\\x}"
file="${file//[!A-Za-z0-9._-]/_}"
else