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
637d2a95
Commit
637d2a95
authored
Apr 09, 2025
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play common.sh: implement get_json_value and use it
parent
7c278aa9
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
6 deletions
+12
-6
common.sh
play.d/common.sh
+7
-1
cursor.sh
play.d/cursor.sh
+1
-2
radicle-httpd.sh
play.d/radicle-httpd.sh
+2
-1
radicle.sh
play.d/radicle.sh
+1
-1
yougile.sh
play.d/yougile.sh
+1
-1
No files found.
play.d/common.sh
View file @
637d2a95
...
@@ -151,6 +151,12 @@ parse_json_value()
...
@@ -151,6 +151,12 @@ parse_json_value()
epm tool json
-b
|
grep
-m1
-F
"
$field
"
|
sed
-e
's|.*[[:space:]]||'
|
sed
-e
's|"\(.*\)"|\1|g'
epm tool json
-b
|
grep
-m1
-F
"
$field
"
|
sed
-e
's|.*[[:space:]]||'
|
sed
-e
's|"\(.*\)"|\1|g'
}
}
# URL/file ["version"]
get_json_value
()
{
eget
-q
-O-
"
$1
"
| parse_json_value
"
$2
"
}
snap_get_pkgurl
()
snap_get_pkgurl
()
{
{
local
SNAPNAME
=
"
$1
"
local
SNAPNAME
=
"
$1
"
...
@@ -163,7 +169,7 @@ snap_get_pkgurl()
...
@@ -163,7 +169,7 @@ snap_get_pkgurl()
get_latest_version
()
get_latest_version
()
{
{
local
ver
local
ver
local
epmver
=
"
$(
epm
--short
--version
)
"
local
epmver
=
"
$(
epm
--short
--version
2>/dev/null
)
"
local
URL
local
URL
epmver
=
$(
echo
"
$epmver
"
|
sed
-e
's|\.[0-9]*$||'
)
epmver
=
$(
echo
"
$epmver
"
|
sed
-e
's|\.[0-9]*$||'
)
for
URL
in
"https://eepm.ru/releases/
$epmver
/app-versions"
"https://eepm.ru/app-versions"
;
do
for
URL
in
"https://eepm.ru/releases/
$epmver
/app-versions"
"https://eepm.ru/app-versions"
;
do
...
...
play.d/cursor.sh
View file @
637d2a95
...
@@ -11,8 +11,7 @@ URL="https://www.cursor.com/"
...
@@ -11,8 +11,7 @@ URL="https://www.cursor.com/"
warn_version_is_not_supported
warn_version_is_not_supported
arch
=
"
$(
epm print info
--arch-arch
)
"
arch
=
"
$(
epm print info
--arch-arch
)
"
JSON
=
"https://www.cursor.com/api/download?platform=linux-
$arch
&releaseTrack=stable"
PKGURL
=
"
$(
eget
-O-
"
$JSON
"
| parse_json_value
"downloadUrl"
)
"
PKGURL
=
"
$(
get_json_value
"https://www.cursor.com/api/download?platform=linux-
$arch
&releaseTrack=stable"
"downloadUrl"
)
"
install_pkgurl
install_pkgurl
play.d/radicle-httpd.sh
View file @
637d2a95
...
@@ -10,7 +10,8 @@ URL="https://radicle.xyz/"
...
@@ -10,7 +10,8 @@ URL="https://radicle.xyz/"
warn_version_is_not_supported
warn_version_is_not_supported
VERSION
=
$(
eget
-q
-O-
"https://files.radicle.xyz/releases/radicle-httpd/latest/radicle-httpd.json"
| epm tool json
-b
|
grep
version |
awk
'gsub(/"/, "", $2) {print $2}'
)
VERSION
=
"
$(
get_json_value
"https://files.radicle.xyz/releases/radicle-httpd/latest/radicle-httpd.json"
"version"
)
"
[
-n
"
$VERSION
"
]
||
fatal
"Can't get version"
[
-n
"
$VERSION
"
]
||
fatal
"Can't get version"
PKGURL
=
"https://files.radicle.xyz/releases/radicle-httpd/latest/radicle-httpd-
$VERSION
-x86_64-unknown-linux-musl.tar.xz"
PKGURL
=
"https://files.radicle.xyz/releases/radicle-httpd/latest/radicle-httpd-
$VERSION
-x86_64-unknown-linux-musl.tar.xz"
...
...
play.d/radicle.sh
View file @
637d2a95
...
@@ -10,7 +10,7 @@ URL="https://radicle.xyz/"
...
@@ -10,7 +10,7 @@ URL="https://radicle.xyz/"
warn_version_is_not_supported
warn_version_is_not_supported
VERSION
=
$(
eget
-q
-O-
"https://files.radicle.xyz/releases/latest/radicle.json"
| epm tool json
-b
|
grep
version |
awk
'gsub(/"/, "", $2) {print $2}'
)
VERSION
=
"
$(
get_json_value
"https://files.radicle.xyz/releases/latest/radicle.json"
"version"
)
"
[
-n
"
$VERSION
"
]
||
fatal
"Can't get version"
[
-n
"
$VERSION
"
]
||
fatal
"Can't get version"
PKGURL
=
"https://files.radicle.xyz/releases/latest/radicle-
$VERSION
-x86_64-unknown-linux-musl.tar.xz"
PKGURL
=
"https://files.radicle.xyz/releases/latest/radicle-
$VERSION
-x86_64-unknown-linux-musl.tar.xz"
...
...
play.d/yougile.sh
View file @
637d2a95
...
@@ -9,7 +9,7 @@ URL="https://yougile.com"
...
@@ -9,7 +9,7 @@ URL="https://yougile.com"
.
$(
dirname
$0
)
/common.sh
.
$(
dirname
$0
)
/common.sh
if
[
"
$VERSION
"
=
"*"
]
;
then
if
[
"
$VERSION
"
=
"*"
]
;
then
VERSION
=
"
$(
eget
-O-
https://dist.yougile.com/app/latest.json |
grep
-o
'"version":[^,}]*'
|
sed
's/[^0-9.]//g'
)
"
VERSION
=
"
$(
get_json_value https://dist.yougile.com/app/latest.json version
)
"
fi
fi
PKGURL
=
"https://dist.yougile.com/app/YouGile-
$VERSION
-x86_64.AppImage"
PKGURL
=
"https://dist.yougile.com/app/YouGile-
$VERSION
-x86_64.AppImage"
...
...
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