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
c897f745
Commit
c897f745
authored
Jul 16, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play assistant: parse site page to get download link
parent
fb964015
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
13 deletions
+19
-13
assistant.sh
play.d/assistant.sh
+19
-13
No files found.
play.d/assistant.sh
View file @
c897f745
...
...
@@ -16,31 +16,37 @@ fi
arch
=
"
$(
$DISTRVENDOR
-a
)
"
pkg
=
"
$(
$DISTRVENDOR
-p
)
"
# parse vendor site
tmpfile
=
$(
mktemp
)
epm tool eget
-q
-O-
"https://мойассистент.рф/скачать"
|
grep
-A50
"Ассистент для LINUX"
>
$tmpfile
url_by_order
()
{
local
order
=
"
$1
"
echo
"https://мойассистент.рф
$(
cat
$tmpfile
|
grep
"/Download/"
|
$order
-n1
|
sed
-e
's|.*href="||'
-e
's|".*||'
)
"
}
version
=
$(
cat
$tmpfile
|
grep
-A1
"Версия:"
|
tail
-n1
|
sed
-e
's|.*<span class="v">||'
-e
's| .*||'
)
[
-n
"
$version
"
]
||
fatal
"Can't get package version"
case
$arch
-
$pkg
in
x86_64-rpm
)
URL
=
"
https://мойассистент.рф/%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C/Download/542
"
OPKG
=
assistant-
4.8
-0.x86_64.rpm
URL
=
"
$(
url_by_order
head
)
"
OPKG
=
assistant-
$version
-0
.x86_64.rpm
;;
x86_64-deb
)
URL
=
"https://мойассистент.рф/%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C/Download/545"
OPKG
=
assistant_4.8-0_amd64.deb
;;
aarch64-rpm
)
URL
=
"https://мойассистент.рф/%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C/Download/551"
OPKG
=
assistant-4.8-0.x86_64.rpm
;;
aarch64-deb
)
URL
=
"https://мойассистент.рф/%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C/Download/552"
OPKG
=
assistant_4.8-0_amd64.deb
URL
=
"
$(
url_by_order
tail
)
"
OPKG
=
assistant_
$version
-0_amd64
.deb
;;
*
)
fatal
"
$(
$DISTRVENDOR
-e
)
is not supported (arch
$arch
, package type is
$pkg
)"
;;
esac
rm
$tmpfile
# after repack on ALT:
# assistant: Требует: /lib/init/vars.sh но пакет не может быть установлен
# Требует: libyuv.so()(64bit) но пакет не может быть установлен
...
...
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