mirror of
https://github.com/dockur/windows.git
synced 2025-12-21 14:41:49 +00:00
fix: Refactor filename function
This commit is contained in:
parent
e2c323ff43
commit
70380d8cfc
@ -127,8 +127,9 @@ startInstall() {
|
|||||||
if [[ "${VERSION,,}" == "http"* ]]; then
|
if [[ "${VERSION,,}" == "http"* ]]; then
|
||||||
|
|
||||||
file=$(basename "${VERSION%%\?*}")
|
file=$(basename "${VERSION%%\?*}")
|
||||||
: "${file//+/ }"; printf -v file '%b' "${_//%/\\x}"
|
file="${file//+/ }"
|
||||||
file=$(echo "$file" | sed -e 's/[^A-Za-z0-9._-]/_/g')
|
printf -v file '%b' "${file//%/\\x}"
|
||||||
|
file="${file//[!A-Za-z0-9._-]/_}"
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user