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
ee640e94
Commit
ee640e94
authored
Apr 07, 2024
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm repack: add checking for tarball name in packrules.list
parent
7cef9b77
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
1 deletion
+37
-1
epm-repack
bin/epm-repack
+30
-1
packrules.list
etc/packrules.list
+7
-0
No files found.
bin/epm-repack
View file @
ee640e94
...
@@ -81,6 +81,32 @@ __check_stoplist()
...
@@ -81,6 +81,32 @@ __check_stoplist()
grep
-E
-q
"^
$1
$"
$alf
grep
-E
-q
"^
$1
$"
$alf
}
}
__convert_packrule_to_regexp
()
{
local
tmpalf
tmpalf
=
"
$(
mktemp
)
"
||
fatal
# copied from eget's filter_glob
# check man glob
# remove commentы and translate glob to regexp
grep
-v
"^[[:space:]]*#"
"
$1
"
|
grep
-v
"^[[:space:]]*$"
|
sed
-e
"s|
\*
|.*|g"
-e
"s|?|.|g"
>
$tmpalf
echo
"
$tmpalf
"
}
# fill __PACKRULE if $1 in packrules.list
__check_packrule
()
{
local
pkg
=
"
$1
"
local
alf
=
"
$CONFIGDIR
/packrules.list"
[
-s
"
$pkg
"
]
||
return
1
[
-s
"
$alf
"
]
||
return
1
local
tmpalf
=
$(
__convert_packrule_to_regexp
"
$alf
"
)
remove_on_exit
$tmpalf
__PACKRULE
=
"
$(
awk
-v
s
=
"
$pkg
"
'BEGIN{FS=" "} s ~ $2 {print $1}'
"
$tmpalf
"
)
"
rm
$tmpalf
[
-n
"
${
__PACKRULE
}
"
]
return
}
# arg: <package file>
# arg: <package file>
# sets:
# sets:
...
@@ -110,7 +136,10 @@ __prepare_source_package()
...
@@ -110,7 +136,10 @@ __prepare_source_package()
load_helper epm-pack
load_helper epm-pack
# they will fill $returntarname
# they will fill $returntarname
if
rihas
"
$alpkg
"
"
\.
AppImage$"
;
then
if
__check_packrule
"
$alpkg
"
;
then
__epm_pack_run_handler
${
__PACKRULE
}
"
$pkg
"
elif
rihas
"
$alpkg
"
"
\.
AppImage$"
;
then
# big hack with $pkg_urls_downloaded (it can be a list, not a single url)
# big hack with $pkg_urls_downloaded (it can be a list, not a single url)
__epm_pack_run_handler generic-appimage
"
$pkg
"
""
"
$pkg_urls_downloaded
"
__epm_pack_run_handler generic-appimage
"
$pkg
"
""
"
$pkg_urls_downloaded
"
SUBGENERIC
=
'appimage'
SUBGENERIC
=
'appimage'
...
...
etc/packrules.list
0 → 100644
View file @
ee640e94
1c-connect 1C-Connect-Linux-x64.tar.gz
davinci-resolve DaVinci_Resolve_*_Linux.run
cascadeur cascadeur-linux.tgz
# there are two package
epsonscan2-non-free-plugin epsonscan2-bundle-*.tar.gz
hplip-plugin hplip-*-plugin
sublime-text sublime_text_build_*
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