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
8337bfa8
Commit
8337bfa8
authored
Mar 27, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm repo list: add (-a|--all) support (print commented out)
parent
4c5923e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
1 deletion
+31
-1
epm-repolist
bin/epm-repolist
+31
-1
No files found.
bin/epm-repolist
View file @
8337bfa8
...
...
@@ -28,6 +28,16 @@ __print_apt_sources_list()
done
|
grep
-v
--
"^ *
\$
"
}
__print_apt_sources_list_full
()
{
local
i
for
i
in
$@
;
do
test
-r
"
$i
"
||
continue
grep
--
"^[[:space:]]*#*[[:space:]]*rpm"
$i
done
|
grep
-v
--
"^ *
\$
"
}
# TODO: remove
__print_apt_sources_list_list
()
{
local
i
...
...
@@ -54,9 +64,29 @@ __print_apt_sources_list_verbose()
done
}
__print_apt_sources_list_verbose_full
()
{
local
i
for
i
in
$@
;
do
test
-r
"
$i
"
||
continue
grep
--
"^[[:space:]]*#*[[:space:]]*rpm"
$i
|
grep
-v
--
"^ *
\$
"
|
grep
-q
.
&&
echo
&&
__info_cyan
"
$i
:"
||
continue
grep
--
"^[[:space:]]*#*[[:space:]]*rpm"
$i
|
grep
-v
--
"^ *
\$
"
|
sed
-e
's|^| |'
-e
"s|
\(
.*#.*
\)
|
$(
set_color
$WHITE
)
\1
$(
restore_color
)
|"
done
}
print_apt_sources_list
()
{
local
LISTS
=
'/etc/apt/sources.list /etc/apt/sources.list.d/*.list'
if
[
"
$1
"
=
"-a"
]
||
[
"
$1
"
=
"--all"
]
;
then
if
[
-n
"
$quiet
"
]
;
then
__print_apt_sources_list_full
$LISTS
else
__print_apt_sources_list_verbose_full
$LISTS
fi
return
fi
if
[
-n
"
$quiet
"
]
;
then
__print_apt_sources_list
$LISTS
else
...
...
@@ -76,7 +106,7 @@ case $PMTYPE in
if
tasknumber
"
$1
"
>
/dev/null
;
then
get_task_packages
"
$@
"
else
print_apt_sources_list
print_apt_sources_list
"
$@
"
#docmd apt-repo list
fi
;;
...
...
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