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
d501c722
Commit
d501c722
authored
May 24, 2024
by
Boris Yumankulov
Committed by
Vitaly Lipatov
Jul 19, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm play: add losless-cut (eterbug #17355)
parent
2490fb8f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
89 additions
and
3 deletions
+89
-3
lossless-cut.sh
pack.d/lossless-cut.sh
+35
-0
common.sh
play.d/common.sh
+15
-3
lossless-cut.sh
play.d/lossless-cut.sh
+27
-0
lossless-cut.sh
repack.d/lossless-cut.sh
+12
-0
No files found.
pack.d/lossless-cut.sh
0 → 100755
View file @
d501c722
#!/bin/sh
TAR
=
"
$1
"
RETURNTARNAME
=
"
$2
"
URL
=
"
$4
"
.
$(
dirname
$0
)
/common.sh
erc unpack
$TAR
||
fatal
mkdir
-p
opt
mv
Loss
*
opt/
$PRODUCT
VERSION
=
$(
echo
"
$URL
"
|
grep
-oP
'v\K[0-9]+\.[0-9]+\.[0-9]+'
)
[
-n
"
$VERSION
"
]
||
fatal
"Can't get package version"
install_file https://raw.githubusercontent.com/mifi/lossless-cut/master/src/renderer/src/icon.svg /usr/share/icons/hicolor/scalable/apps/
$PRODUCT
.svg
# create desktop file
cat
<<
EOF
| create_file /usr/share/applications/
$PRODUCT
.desktop
[Desktop Entry]
Type=Application
Name=LosslessCut
Comment=GUI tool for lossless trimming/cutting of media files
Exec=
$PRODUCT
Categories=AudioVideo;
Icon=
$PRODUCT
StartupWMClass=losslesscut
EOF
PKGNAME
=
$PRODUCT
-
$VERSION
erc pack
$PKGNAME
.tar opt usr
||
fatal
return_tar
$PKGNAME
.tar
play.d/common.sh
View file @
d501c722
...
...
@@ -77,11 +77,13 @@ epm()
$EPM
"
$@
"
}
eget
()
{
epm tool eget
"
$@
"
}
is_supported_arch
()
{
local
i
...
...
@@ -159,16 +161,26 @@ get_latest_version()
get_github_version
()
{
is_command jq
||
fatal
"jq not found, please install jq"
local
url
=
"
$1
"
local
user_and_repo
=
${
url
#https
://github.com/
}
local
user_and_repo
=
${
user_and_repo
%/
}
local
asset_name
=
"
$2
"
if
[
"
$3
"
==
"prerelease"
]
;
then
curl
-s
"https://api.github.com/repos/
${
user_and_repo
}
/releases"
|
jq
-r
'.[] | .assets[].browser_download_url
'
|
grep
"
$2
"
|
head
-n1
curl
-s
"https://api.github.com/repos/
${
user_and_repo
}
/releases"
|
grep
'browser_download_url'
|
grep
-iEo
'https.*download.*
'
|
grep
"
$2
"
|
head
-n1
else
curl
-s
"https://api.github.com/repos/
${
user_and_repo
}
/releases"
| jq
-r
'.[] | select(.prerelease == false) | .assets[].browser_download_url'
|
grep
"
$2
"
|
head
-n1
curl
-s
"https://api.github.com/repos/
${
user_and_repo
}
/releases"
\
|
awk
'{
if ($0 ~ /"prerelease": false/) {
prerelease = 0;
} else if ($0 ~ /"prerelease": true/) {
prerelease = 1;
}
if (!prerelease && $0 ~ /"browser_download_url":/) {
match($0, /"browser_download_url": "(https[^"]*)"/, arr);
print arr[1];
}
}'
|
grep
"
$2
"
|
head
-1
fi
}
...
...
play.d/lossless-cut.sh
0 → 100755
View file @
d501c722
#!/bin/sh
PKGNAME
=
lossless-cut
SUPPORTEDARCHES
=
"x86_64 aarch64 armhf"
VERSION
=
"
$2
"
DESCRIPTION
=
'The swiss army knife of lossless video/audio editing'
URL
=
"https://github.com/mifi/lossless-cut"
.
$(
dirname
$0
)
/common.sh
case
"
$(
epm print info
-a
)
"
in
x86_64
)
arch
=
"x64"
;;
aarch64
)
arch
=
"arm64"
;;
armhf
)
arch
=
"armv7l"
;;
esac
if
[
"
$VERSION
"
=
"*"
]
;
then
PKGURL
=
$(
get_github_version
"https://github.com/mifi/lossless-cut/"
"LosslessCut-linux-
$arch
.tar.bz2"
)
else
PKGURL
=
"https://github.com/mifi/lossless-cut/releases/download/v
$VERSION
/LosslessCut-linux-
$arch
.tar.bz2"
fi
install_pack_pkgurl
repack.d/lossless-cut.sh
0 → 100644
View file @
d501c722
#!/bin/sh -x
# It will be run with two args: buildroot spec
BUILDROOT
=
"
$1
"
SPEC
=
"
$2
"
.
$(
dirname
$0
)
/common.sh
add_libs_requires
add_electron_deps
fix_chrome_sandbox
add_bin_exec_command
$PRODUCT
$PRODUCTDIR
/losslesscut
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