Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
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
eepm
Commits
72a0ba28
Commit
72a0ba28
authored
Aug 24, 2021
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit packed 3.10.2
parent
c62aec12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
10 deletions
+34
-10
epm.sh
packed/epm.sh
+0
-0
serv.sh
packed/serv.sh
+34
-10
No files found.
packed/epm.sh
View file @
72a0ba28
This diff is collapsed.
Click to expand it.
packed/serv.sh
View file @
72a0ba28
...
@@ -353,6 +353,17 @@ confirm() {
...
@@ -353,6 +353,17 @@ confirm() {
esac
esac
}
}
confirm_info
()
{
info
"
$*
"
if
[
-z
"
$non_interactive
"
]
;
then
confirm
"Are you sure? [y/N]"
||
fatal
"Exiting"
fi
}
assure_root
()
assure_root
()
{
{
[
"
$EFFUID
"
=
0
]
||
fatal
"run me only under root"
[
"
$EFFUID
"
=
0
]
||
fatal
"run me only under root"
...
@@ -2132,7 +2143,8 @@ get_github_urls()
...
@@ -2132,7 +2143,8 @@ get_github_urls()
grep
-i
-o
-E
'"browser_download_url": "https://.*"'
|
cut
-d
'"'
-f4
grep
-i
-o
-E
'"browser_download_url": "https://.*"'
|
cut
-d
'"'
-f4
}
}
if
echo
"
$1
"
|
grep
-q
"^https://github.com/"
;
then
if
echo
"
$1
"
|
grep
-q
"^https://github.com/"
&&
\
echo
"
$1
"
|
grep
-q
-v
"/download/"
&&
[
-n
"
$2
"
]
;
then
MASK
=
"
$2
"
MASK
=
"
$2
"
if
[
-n
"
$LISTONLY
"
]
;
then
if
[
-n
"
$LISTONLY
"
]
;
then
...
@@ -2159,32 +2171,44 @@ if echo "$1" | grep -q "^ftp://" ; then
...
@@ -2159,32 +2171,44 @@ if echo "$1" | grep -q "^ftp://" ; then
return
return
fi
fi
# drop mask part
# mask allowed only in the last part of path
URL
=
"
$(
dirname
"
$1
"
)
/"
MASK
=
$(
basename
"
$1
"
)
# if mask are second arg
if
[
-n
"
$2
"
]
;
then
URL
=
"
$1
"
MASK
=
"
$2
"
else
# drop mask part
URL
=
"
$(
dirname
"
$1
"
)
"
fi
if
echo
"
$URL
"
|
grep
-q
"[*?]"
;
then
if
echo
"
$URL
"
|
grep
-q
"[*?]"
;
then
fatal
"Error: there are globbing symbols (*?) in
$URL
"
fatal
"Error: there are globbing symbols (*?) in
$URL
"
fi
fi
# mask allowed only in the last part of path
MASK
=
$(
basename
"
$1
"
)
# If have no wildcard symbol like asterisk, just download
# If have no wildcard symbol like asterisk, just download
if
echo
"
$MASK
"
|
grep
-qv
"[*?]"
||
echo
"
$MASK
"
|
grep
-q
"[?].*="
;
then
if
echo
"
$MASK
"
|
grep
-qv
"[*?]"
||
echo
"
$MASK
"
|
grep
-q
"[?].*="
;
then
sget
"
$1
"
"
$TARGETFILE
"
sget
"
$1
"
"
$TARGETFILE
"
return
return
fi
fi
is_url
()
{
echo
"
$1
"
|
grep
-q
"://"
}
get_urls
()
get_urls
()
{
{
scat
$URL
|
\
scat
$URL
|
\
grep
-i
-o
-E
'href="([^\*/"#]
+)"'
|
cut
-d
'"'
-f2
grep
-i
-o
-E
'href="(.
+)"'
|
cut
-d
'"'
-f2
}
}
if
[
-n
"
$LISTONLY
"
]
;
then
if
[
-n
"
$LISTONLY
"
]
;
then
for
fn
in
$(
get_urls | filter_glob
"
$MASK
"
| filter_order
)
;
do
for
fn
in
$(
get_urls | filter_glob
"
$MASK
"
| filter_order
)
;
do
# TODO: return full url? someone use old behaviour?
is_url
"
$fn
"
&&
echo
$fn
&&
continue
echo
"
$(
basename
"
$fn
"
)
"
fn
=
"
$(
echo
"
$fn
"
|
sed
-e
's|^./||'
-e
's|^/+||'
)
"
echo
"
$URL
/
$fn
"
done
done
return
return
fi
fi
...
@@ -2818,7 +2842,7 @@ print_version()
...
@@ -2818,7 +2842,7 @@ print_version()
local
on_text
=
"(host system)"
local
on_text
=
"(host system)"
local
virt
=
"
$(
$DISTRVENDOR
-i
)
"
local
virt
=
"
$(
$DISTRVENDOR
-i
)
"
[
"
$virt
"
=
"(unknown)"
]
||
[
"
$virt
"
=
"(host system)"
]
||
on_text
=
"(under
$virt
)"
[
"
$virt
"
=
"(unknown)"
]
||
[
"
$virt
"
=
"(host system)"
]
||
on_text
=
"(under
$virt
)"
echo
"Service manager version 3.10.
1
https://wiki.etersoft.ru/Epm"
echo
"Service manager version 3.10.
2
https://wiki.etersoft.ru/Epm"
echo
"Running on
$(
$DISTRVENDOR
-e
)
$on_text
with
$SERVICETYPE
"
echo
"Running on
$(
$DISTRVENDOR
-e
)
$on_text
with
$SERVICETYPE
"
echo
"Copyright (c) Etersoft 2012-2019"
echo
"Copyright (c) Etersoft 2012-2019"
echo
"This program may be freely redistributed under the terms of the GNU AGPLv3."
echo
"This program may be freely redistributed under the terms of the GNU AGPLv3."
...
...
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