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
09d58725
Commit
09d58725
authored
Feb 08, 2026
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eget: replace dirname/basename with parameter expansion in init_eget
parent
3678f4f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
19 deletions
+26
-19
eget
eget
+26
-19
No files found.
eget
View file @
09d58725
...
...
@@ -24,14 +24,21 @@
init_eget
()
{
PROGDIR
=
$(
dirname
"
$0
"
)
PROGNAME
=
$(
basename
"
$0
"
)
CMDSHELL
=
"/bin/sh"
[
"
$PROGDIR
"
=
"."
]
&&
PROGDIR
=
"
$(
pwd
)
"
if
[
"
$0
"
=
"/dev/stdin"
]
||
[
"
$0
"
=
"sh"
]
;
then
PROGDIR
=
""
PROGNAME
=
""
fi
case
"
$0
"
in
/dev/stdin|sh
)
PROGDIR
=
""
PROGNAME
=
""
;;
*
/
*
)
PROGDIR
=
"
${
0
%/*
}
"
PROGNAME
=
"
${
0
##*/
}
"
;;
*
)
PROGDIR
=
"
$(
pwd
)
"
PROGNAME
=
"
$0
"
;;
esac
}
init_eget
...
...
@@ -2465,6 +2472,18 @@ if [ -n "$INPUTFILE" ] ; then
exit
fi
is_wildcard
()
{
case
"
$1
"
in
*
[
*
?]
*
|
*
\[
*
|
*
\]
*
)
return
0
;;
esac
return
1
}
is_query_string
()
{
case
"
$1
"
in
*
\?
*
=
*
)
return
0
;;
esac
return
1
}
# https://www.freeoffice.com/download.php?filename=freeoffice-2021-1062.x86_64.rpm
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"
...
...
@@ -2494,18 +2513,6 @@ if [ -n "$LISTONLY" ] ; then
exit
fi
is_wildcard
()
{
case
"
$1
"
in
*
[
*
?]
*
|
*
\[
*
|
*
\]
*
)
return
0
;;
esac
return
1
}
is_query_string
()
{
case
"
$1
"
in
*
\?
*
=
*
)
return
0
;;
esac
return
1
}
# If there is no wildcard symbol like asterisk, just download
if
[
-
z
"
$SEPMASK
"
]
&&
!
is_wildcard
"
$MASK
"
||
is_query_string
"
$MASK
"
;
then
sget
"
$1
"
"
$TARGETFILE
"
...
...
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