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
4f09533e
Commit
4f09533e
authored
Mar 10, 2025
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-removerepo: improve removing
parent
7417e8fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
epm-removerepo
bin/epm-removerepo
+11
-6
No files found.
bin/epm-removerepo
View file @
4f09533e
...
...
@@ -34,11 +34,13 @@ __epm_removerepo_apt()
local
sc
=
"sudocmd"
[
-z
"
$quiet
"
]
||
sc
=
"sudorun"
# aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for AstraLinuxCE/orel
$sc
sed
-i
-e
"s|.*
$repo
.*||"
/etc/apt/sources.list
if
[
-d
/etc/apt/sources.list.d
]
&&
ls
/etc/apt/sources.list.d/
*
.list
>
/dev/null 2>/dev/null
;
then
$sc
sed
-i
-e
"s|.*
$repo
.*||"
/etc/apt/sources.list.d/
*
.list
fi
local
i
for
i
in
/etc/apt/sources.list /etc/apt/sources.list.d/
*
.list
;
do
[
-s
"
$i
"
]
||
continue
# touch file only when it is needed
grep
-q
-E
"
$repo
"
$i
||
continue
$sc
sed
-i
-e
"s|.*
$repo
.*||"
$i
done
}
...
...
@@ -59,7 +61,10 @@ __epm_removerepo_alt_grepremove()
rl
=
"
$1
"
else
rl
=
"
$(
__epm_grep_repo_list
"
$@
"
2>/dev/null
)
"
[
-z
"
$rl
"
]
&&
warning
'Can'
\'
't find '
$*
' in the repos (see # epm repolist output)'
&&
return
1
if
[
-z
"
$rl
"
]
;
then
[
-n
"
$verbose
"
]
&&
warning
'Can'
\'
't find '
$*
' in the repos (see # epm repolist output)'
return
1
fi
fi
echo
"
$rl
"
|
while
read
rp
;
do
__epm_removerepo_apt
"
$rp
"
...
...
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