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
1b6ae644
Commit
1b6ae644
authored
Aug 06, 2012
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
search_file: realize search_file on ALT Linux via grep local contents_index
parent
4b552598
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
epm-search_file
bin/epm-search_file
+25
-1
No files found.
bin/epm-search_file
View file @
1b6ae644
...
...
@@ -18,12 +18,36 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#
# https://bugzilla.altlinux.org/show_bug.cgi?id=14449
local_content_search
()
{
local
SYSARCH
SYSARCH
=
$(
uname
-m
)
[
"
$SYSARCH
"
=
"x86_64"
]
||
SYSARCH
=
i586
local
REPODIR
=
/var/ftp/pub/ALTLinux/Sisyphus
local
CI
=
$REPODIR
/
$SYSARCH
/base/contents_index
local
CINOA
=
$REPODIR
/noarch/base/contents_index
local
OUTCMD
=
"less"
[
-n
"
$USETTY
"
]
||
OUTCMD
=
"cat"
test
-r
$CI
&&
test
-r
$CINOA
||
fatal
"Can't locate
$CI
or
$CINOA
"
{
[
-n
"
$USETTY
"
]
&&
echo
"Search in
$CI
and
$CINOA
for
$1
..."
grep
-h
".*
$1
.*
\t
"
$CI
$CINOA
|
sed
-e
"s|
\(
.*
\)\t\(
.*
\)
|
\2
:
\1
|g"
}
|
$OUTCMD
}
epm_search_file
()
{
[
-n
"
$pkg_filenames
"
]
||
fatal
"Run search without names"
case
$PMTYPE
in
apt-rpm|apt-dpkg
)
apt-rpm
)
local_content_search
$pkg_filenames
return
;;
apt-dpkg
)
docmd
$SUDO
apt-file update
docmd apt-file search
$pkg_filenames
return
;;
...
...
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