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
Nurlan
eepm
Commits
303cb135
Commit
303cb135
authored
2 years ago
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play assistant: add URI checking and fix download on Ubuntu
parent
80a958ff
master
3.32.0
3.29.0
3.28.5
3.27.0
3.26.10
3.23.0
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
assistant.sh
play.d/assistant.sh
+11
-2
No files found.
play.d/assistant.sh
View file @
303cb135
...
@@ -18,16 +18,25 @@ fi
...
@@ -18,16 +18,25 @@ fi
arch
=
"
$(
$DISTRVENDOR
-a
)
"
arch
=
"
$(
$DISTRVENDOR
-a
)
"
pkg
=
"
$(
$DISTRVENDOR
-p
)
"
pkg
=
"
$(
$DISTRVENDOR
-p
)
"
# some locale depend troubles (ALT with bash 4 needs LANG=ru_RU.UTF-8, Ubuntu with bash 5 needs LANG=C.UTF-8)
#URL="https://мойассистент.рф/скачать"
URL
=
"https://xn--80akicokc0aablc.xn--p1ai/%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C"
if
!
LANG
=
ru_RU.UTF8 check_url_is_accessible
"
$URL
"
;
then
epm tool eget
-O-
"
$URL
"
fatal
"Please, check why
$URL
is not accessible"
fi
# parse vendor site
# parse vendor site
tmpfile
=
$(
mktemp
)
tmpfile
=
$(
mktemp
)
LANG
=
ru_RU.UTF8 epm tool eget
-q
-O-
"https://мойассистент.рф/скачать
"
|
grep
-A50
"Ассистент для LINUX"
>
$tmpfile
epm tool eget
-q
-O-
"
$URL
"
|
grep
-A50
"Ассистент для LINUX"
>
$tmpfile
url_by_order
()
url_by_order
()
{
{
local
order
=
"
$1
"
local
order
=
"
$1
"
local
pkg
=
"
$(
cat
$tmpfile
|
grep
"/Download/"
|
$order
-n1
|
sed
-e
's|.*href="||'
-e
's|".*||'
)
"
local
pkg
=
"
$(
cat
$tmpfile
|
grep
"/Download/"
|
$order
-n1
|
sed
-e
's|.*href="||'
-e
's|".*||'
)
"
[
-n
"
$pkg
"
]
||
fatal
"Can't get Download href"
[
-n
"
$pkg
"
]
||
fatal
"Can't get Download href"
echo
"https://мойассистент.рф
$pkg
"
#echo "https://мойассистент.рф$pkg"
echo
"https://xn--80akicokc0aablc.xn--p1ai
$pkg
"
}
}
case
$arch
-
$pkg
in
case
$arch
-
$pkg
in
...
...
This diff is collapsed.
Click to expand it.
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