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
2efca978
Commit
2efca978
authored
3 years ago
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-repolist: improve repolist
parent
c6046641
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
10 deletions
+46
-10
epm-repolist
bin/epm-repolist
+46
-10
No files found.
bin/epm-repolist
View file @
2efca978
#!/bin/sh
#!/bin/sh
#
#
# Copyright (C) 2012, 2016, 2019, 2020 Etersoft
# Copyright (C) 2012, 2016, 2019, 2020
, 2021
Etersoft
# Copyright (C) 2012, 2016, 2019, 2020 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012, 2016, 2019, 2020
, 2021
Vitaly Lipatov <lav@etersoft.ru>
#
#
# This program is free software: you can redistribute it and/or modify
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# it under the terms of the GNU Affero General Public License as published by
...
@@ -19,34 +19,70 @@
...
@@ -19,34 +19,70 @@
load_helper epm-sh-altlinux
load_helper epm-sh-altlinux
print_apt_sources_list
()
__
print_apt_sources_list
()
{
{
local
i
local
i
for
i
in
$@
;
do
for
i
in
$@
;
do
test
-r
"
$i
"
||
continue
test
-r
"
$i
"
||
continue
#echo
grep
-v
--
"^.*#"
$i
#echo "$i:"
grep
-v
--
"^#"
$i
done
|
grep
-v
--
"^ *
\$
"
done
|
grep
-v
--
"^ *
\$
"
}
}
__print_apt_sources_list_list
()
{
local
i
for
i
in
$@
;
do
test
-r
"
$i
"
||
continue
grep
-v
--
"^.*#"
$i
|
grep
-v
--
"^ *
\$
"
|
grep
-q
.
&&
echo
"
$i
"
done
}
__info_cyan
()
{
set_boldcolor
$CYAN
echo
"
$*
"
>
&2
restore_color
}
__print_apt_sources_list_verbose
()
{
local
i
for
i
in
$@
;
do
test
-r
"
$i
"
||
continue
grep
-v
--
"^.*#"
$i
|
grep
-v
--
"^ *
\$
"
|
grep
-q
.
&&
__info_cyan
"
$i
:"
||
continue
grep
-v
--
"^.*#"
$i
|
grep
-v
--
"^ *
\$
"
|
sed
-e
's|^| |'
done
}
print_apt_sources_list
()
{
local
LISTS
=
'/etc/apt/sources.list /etc/apt/sources.list.d/*.list'
# if [ -n "$verbose" ] ; then
__print_apt_sources_list_verbose
$LISTS
# else
# __print_apt_sources_list_list $LISTS
# __print_apt_sources_list $LISTS
# fi
}
epm_repolist
()
epm_repolist
()
{
{
case
$PMTYPE
in
case
$PMTYPE
in
apt-rpm
)
apt-rpm
)
assure_exists apt-repo
#
assure_exists apt-repo
if
tasknumber
"
$pkg_names
"
>
/dev/null
;
then
if
tasknumber
"
$pkg_names
"
>
/dev/null
;
then
get_task_packages
$pkg_names
get_task_packages
$pkg_names
else
else
docmd apt-repo list
print_apt_sources_list
#docmd apt-repo list
fi
fi
;;
;;
deepsolver-rpm
)
deepsolver-rpm
)
docmd ds-conf
docmd ds-conf
;;
;;
apt-dpkg|aptitude-dpkg
)
apt-dpkg|aptitude-dpkg
)
showcmd
cat
/etc/apt/sources.list /etc/apt/sources.list.d/
*
.list
print_apt_sources_list
print_apt_sources_list /etc/apt/sources.list /etc/apt/sources.list.d/
*
.list
;;
;;
yum-rpm
)
yum-rpm
)
docmd yum repolist
-v
docmd yum repolist
-v
...
...
This diff is collapsed.
Click to expand it.
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