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
Vladislav
eepm
Commits
f62bc6ba
Commit
f62bc6ba
authored
May 05, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-sh-install: move some status related check code to epm-status
parent
e61e6a6b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
45 deletions
+49
-45
epm-sh-install
bin/epm-sh-install
+1
-45
epm-status
bin/epm-status
+48
-0
No files found.
bin/epm-sh-install
View file @
f62bc6ba
...
...
@@ -67,51 +67,6 @@ get_only_installed_packages()
estrlist exclude
"
$(
echo
"
$installlist
"
|
(
skip_installed
=
'yes'
filter_out_installed_packages
)
)"
"
$installlist
"
}
__convert_pkgallowscripts_to_regexp
()
{
local
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"
-e
"s|^|^|"
-e
"s|
$|
\$
|"
>
$tmpalf
echo
"
$tmpalf
"
}
__epm_package_name_ok_scripts
()
{
local
name
=
"
$1
"
local
alf
=
"
$CONFIGDIR
/pkgallowscripts.list"
[
-s
"
$alf
"
]
||
return
1
[
-n
"
$name
"
]
||
return
1
local
tmpalf
=
$(
__convert_pkgallowscripts_to_regexp
"
$alf
"
)
echo
"
$name
"
|
grep
-q
-f
$tmpalf
local
res
=
$?
rm
$tmpalf
return
$res
}
__epm_package_ok_scripts
()
{
local
pkg
=
"
$1
"
local
name
# TODO: improve epm print name and use it here
name
=
"
$(
epm print field Name
for
"
$pkg
"
2>/dev/null
)
"
[
-n
"
$name
"
]
||
return
1
__epm_package_name_ok_scripts
"
$name
"
}
__epm_vendor_ok_scripts
()
{
local
vendor
=
"
$1
"
local
alf
=
"
$CONFIGDIR
/vendorallowscripts.list"
[
-s
"
$alf
"
]
||
return
1
[
-n
"
$vendor
"
]
||
return
1
local
tmpalf
=
$(
__convert_pkgallowscripts_to_regexp
"
$alf
"
)
echo
"
$vendor
"
|
grep
-q
-f
$tmpalf
local
res
=
$?
rm
$tmpalf
return
$res
}
__epm_print_warning_for_nonalt_packages
()
{
...
...
@@ -187,3 +142,4 @@ __epm_check_vendor()
noscripts
=
"--noscripts"
done
}
bin/epm-status
View file @
f62bc6ba
...
...
@@ -19,6 +19,54 @@
load_helper epm-query
__convert_pkgallowscripts_to_regexp
()
{
local
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"
-e
"s|^|^|"
-e
"s|
$|
\$
|"
>
$tmpalf
echo
"
$tmpalf
"
}
__epm_package_name_ok_scripts
()
{
local
name
=
"
$1
"
local
alf
=
"
$CONFIGDIR
/pkgallowscripts.list"
[
-s
"
$alf
"
]
||
return
1
[
-n
"
$name
"
]
||
return
1
local
tmpalf
=
$(
__convert_pkgallowscripts_to_regexp
"
$alf
"
)
echo
"
$name
"
|
grep
-q
-f
$tmpalf
local
res
=
$?
rm
$tmpalf
return
$res
}
__epm_package_ok_scripts
()
{
local
pkg
=
"
$1
"
local
name
# TODO: improve epm print name and use it here
name
=
"
$(
epm print field Name
for
"
$pkg
"
2>/dev/null
)
"
[
-n
"
$name
"
]
||
return
1
__epm_package_name_ok_scripts
"
$name
"
}
__epm_vendor_ok_scripts
()
{
local
vendor
=
"
$1
"
local
alf
=
"
$CONFIGDIR
/vendorallowscripts.list"
[
-s
"
$alf
"
]
||
return
1
[
-n
"
$vendor
"
]
||
return
1
local
tmpalf
=
$(
__convert_pkgallowscripts_to_regexp
"
$alf
"
)
echo
"
$vendor
"
|
grep
-q
-f
$tmpalf
local
res
=
$?
rm
$tmpalf
return
$res
}
epm_status_installable
()
{
local
pkg
=
"
$1
"
...
...
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