Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eget
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
eget
Commits
ad7bcf8a
Commit
ad7bcf8a
authored
Feb 08, 2026
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eget: add is_wildcard/is_query_string, replace grep in glob checks
parent
879b9d4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
eget
eget
+10
-5
No files found.
eget
View file @
ad7bcf8a
...
@@ -2444,7 +2444,7 @@ if [ -n "$INPUTFILE" ] ; then
...
@@ -2444,7 +2444,7 @@ if [ -n "$INPUTFILE" ] ; then
fi
fi
# https://www.freeoffice.com/download.php?filename=freeoffice-2021-1062.x86_64.rpm
# https://www.freeoffice.com/download.php?filename=freeoffice-2021-1062.x86_64.rpm
if
[
-
z
"
$NOGLOB
"
]
&&
echo
"
$URL
"
|
grep
-
q
-
P
"[*
\[\]
]
"
;
then
if
[
-
z
"
$NOGLOB
"
]
&&
is_wildcard
"
$URL
"
&&
!
is_query_string
"
$URL
"
;
then
fatal
"Error: there are globbing symbol (*[]) in
$URL
. It is allowed only for mask part"
fatal
"Error: there are globbing symbol (*[]) in
$URL
. It is allowed only for mask part"
fi
fi
...
@@ -2474,13 +2474,18 @@ fi
...
@@ -2474,13 +2474,18 @@ fi
is_wildcard
()
is_wildcard
()
{
{
echo
"
$1
"
|
grep
-
q
"[*?]"
&&
return
case
"
$1
"
in
*
[
*
?]
*
|
*
\[
*
|
*
\]
*
)
return
0
;;
esac
echo
"
$1
"
|
grep
-
q
"
\]
"
&&
return
return
1
echo
"
$1
"
|
grep
-
q
"
\[
"
&&
return
}
is_query_string
()
{
case
"
$1
"
in
*
\?
*
=
*
)
return
0
;;
esac
return
1
}
}
# If there is no wildcard symbol like asterisk, just download
# If there is no wildcard symbol like asterisk, just download
if
[
-
z
"
$SEPMASK
"
]
&&
!
is_wildcard
"
$MASK
"
||
echo
"
$MASK
"
|
grep
-
q
"[?].*="
;
then
if
[
-
z
"
$SEPMASK
"
]
&&
!
is_wildcard
"
$MASK
"
||
is_query_string
"
$MASK
"
;
then
sget
"
$1
"
"
$TARGETFILE
"
sget
"
$1
"
"
$TARGETFILE
"
exit
exit
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment