From d89d2fd89e1a392163a3da655cd6ba651750c66b Mon Sep 17 00:00:00 2001 From: Ayoub Zaki Date: Thu, 30 Jan 2025 17:23:07 +0100 Subject: [PATCH] bmap-writer-stream.sh: allow username/passwd usage in the url --- bmap-writer-stream.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bmap-writer-stream.sh b/bmap-writer-stream.sh index a88580a..1cbae46 100755 --- a/bmap-writer-stream.sh +++ b/bmap-writer-stream.sh @@ -2,7 +2,7 @@ export PATH=$PWD:$PATH -IMAGE_URL=$(echo "$1" | grep -P '^(https?|s?ftp)://([\da-zA-Z\.-]+)(:\d+)?(/[^\s]*)?$' > /dev/null && echo "$1" || echo "") +IMAGE_URL=$(echo "$1" | grep -P '^(https?|s?ftp)://([\w\-]+(:[\w\-]+)?@)?([\da-zA-Z\.-]+)(:\d+)?(/[^\s]*)?$' > /dev/null && echo "$1" || echo "") DEVICE=$2 WGET=$(which wget)