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
8e069ff9
Commit
8e069ff9
authored
Aug 24, 2021
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-removerepo: improve remove repo by mask
parent
2efca978
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
epm-removerepo
bin/epm-removerepo
+14
-5
No files found.
bin/epm-removerepo
View file @
8e069ff9
#!/bin/sh
#!/bin/sh
#
#
# Copyright (C) 2012, 2017, 2020 Etersoft
# Copyright (C) 2012, 2017, 2020
, 2021
Etersoft
# Copyright (C) 2012, 2017, 2020 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012, 2017, 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
...
@@ -23,9 +23,17 @@ load_helper epm-sh-altlinux
...
@@ -23,9 +23,17 @@ load_helper epm-sh-altlinux
__epm_removerepo_alt_grepremove
()
__epm_removerepo_alt_grepremove
()
{
{
local
rp
local
rp
epm repolist |
grep
-E
"
$1
"
|
while
read
rp
;
do
local
flag
=
0
sudocmd apt-repo
$dryrun
rm
"
$rp
"
epm repolist 2>/dev/null |
grep
-E
"
$1
"
|
while
read
rp
;
do
[
-n
"
$dryrun
"
]
||
apt-repo
--dry-run
rm
"
$rp
"
if
[
-n
"
$verbose
"
]
;
then
sudocmd apt-repo
$dryrun
rm
"
$rp
"
else
$SUDO
apt-repo
$dryrun
rm
"
$rp
"
fi
flag
=
1
done
done
[
"
$flag
"
=
"0"
]
&&
warning
"Can't find '
$1
' in the repos (see 'epm repolist' output)"
}
}
__epm_removerepo_alt
()
__epm_removerepo_alt
()
...
@@ -64,7 +72,8 @@ __epm_removerepo_alt()
...
@@ -64,7 +72,8 @@ __epm_removerepo_alt()
;;
;;
*
)
*
)
# TODO: if return empty for whole line, use grep
# TODO: if return empty for whole line, use grep
sudocmd apt-repo
$dryrun
rm
"
$*
"
# sudocmd apt-repo $dryrun rm "$*"
__epm_removerepo_alt_grepremove
"
$*
"
;;
;;
esac
esac
...
...
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