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
cef80e2e
Commit
cef80e2e
authored
Feb 11, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use grep with -- before params
parent
4935e56a
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
10 deletions
+12
-10
epm-check
bin/epm-check
+2
-0
epm-query
bin/epm-query
+2
-2
epm-query_file
bin/epm-query_file
+1
-1
epm-query_package
bin/epm-query_package
+1
-1
epm-repolist
bin/epm-repolist
+4
-4
epm-search_file
bin/epm-search_file
+1
-1
epm-sh-functions
bin/epm-sh-functions
+1
-1
No files found.
bin/epm-check
View file @
cef80e2e
...
@@ -46,6 +46,8 @@ case $PMTYPE in
...
@@ -46,6 +46,8 @@ case $PMTYPE in
[
-n
"
$PKGLIST
"
]
||
break
[
-n
"
$PKGLIST
"
]
||
break
sudocmd yum remove
$PKGLIST
sudocmd yum remove
$PKGLIST
done
done
docmd rpm
-Va
--nofiles
--nodigest
;;
;;
urpm-rpm
)
urpm-rpm
)
sudocmd urpme
--auto-orphans
sudocmd urpme
--auto-orphans
...
...
bin/epm-query
View file @
cef80e2e
...
@@ -26,9 +26,9 @@ _query_via_packages_list()
...
@@ -26,9 +26,9 @@ _query_via_packages_list()
local
res
=
0
local
res
=
0
local
firstpkg
=
$1
local
firstpkg
=
$1
shift
shift
epm_packages |
grep
"
$firstpkg
-"
||
res
=
1
epm_packages |
grep
--
"
$firstpkg
-"
||
res
=
1
for
pkg
in
"
$@
"
;
do
for
pkg
in
"
$@
"
;
do
epm_packages 2>/dev/null |
grep
"
$pkg
-"
||
res
=
1
epm_packages 2>/dev/null |
grep
--
"
$pkg
-"
||
res
=
1
done
done
return
$res
return
$res
}
}
...
...
bin/epm-query_file
View file @
cef80e2e
...
@@ -86,7 +86,7 @@ __do_query()
...
@@ -86,7 +86,7 @@ __do_query()
;;
;;
slackpkg
)
slackpkg
)
# note: need remove leading slash for grep
# note: need remove leading slash for grep
docmd
grep
-R
"
$(
echo
$@
|
sed
-e
's|^/\+||g'
)
"
/var/log/packages |
sed
-e
"s|/var/log/packages/||g"
docmd
grep
-R
--
"
$(
echo
$@
|
sed
-e
's|^/\+||g'
)
"
/var/log/packages |
sed
-e
"s|/var/log/packages/||g"
return
return
;;
;;
*
)
*
)
...
...
bin/epm-query_package
View file @
cef80e2e
...
@@ -22,5 +22,5 @@ load_helper epm-packages
...
@@ -22,5 +22,5 @@ load_helper epm-packages
epm_query_package
()
epm_query_package
()
{
{
#showcmd grep --color "$pkg_filenames"
#showcmd grep --color "$pkg_filenames"
pkg_filenames
=
epm_packages |
grep
--color
"
$pkg_filenames
"
pkg_filenames
=
epm_packages |
grep
--color
--
"
$pkg_filenames
"
}
}
bin/epm-repolist
View file @
cef80e2e
...
@@ -24,8 +24,8 @@ print_apt_sources_list()
...
@@ -24,8 +24,8 @@ print_apt_sources_list()
test
-r
"
$i
"
||
continue
test
-r
"
$i
"
||
continue
#echo
#echo
#echo "$i:"
#echo "$i:"
grep
-v
"^#"
$i
grep
-v
--
"^#"
$i
done
|
grep
-v
"^ *
\$
"
done
|
grep
-v
--
"^ *
\$
"
}
}
epm_repolist
()
epm_repolist
()
...
@@ -57,10 +57,10 @@ case $PMTYPE in
...
@@ -57,10 +57,10 @@ case $PMTYPE in
docmd layman
-L
docmd layman
-L
;;
;;
pacman
)
pacman
)
docmd
grep
-v
"^#
\|
^$"
/etc/pacman.conf
docmd
grep
-v
--
"^#
\|
^$"
/etc/pacman.conf
;;
;;
slackpkg
)
slackpkg
)
docmd
grep
-v
"^#
\|
^$"
/etc/slackpkg/mirrors
docmd
grep
-v
--
"^#
\|
^$"
/etc/slackpkg/mirrors
;;
;;
*
)
*
)
fatal
"Do not known command for
$PMTYPE
"
fatal
"Do not known command for
$PMTYPE
"
...
...
bin/epm-search_file
View file @
cef80e2e
...
@@ -36,7 +36,7 @@ local_content_search()
...
@@ -36,7 +36,7 @@ local_content_search()
{
{
[
-n
"
$USETTY
"
]
&&
echo
"Search in
$CI
and
$CINOA
for
$1
..."
[
-n
"
$USETTY
"
]
&&
echo
"Search in
$CI
and
$CINOA
for
$1
..."
grep
-h
".*
$1
.*
\t
"
$CI
$CINOA
|
sed
-e
"s|
\(
.*
\)\t\(
.*
\)
|
\2
:
\1
|g"
grep
-h
--
".*
$1
.*
\t
"
$CI
$CINOA
|
sed
-e
"s|
\(
.*
\)\t\(
.*
\)
|
\2
:
\1
|g"
}
|
$OUTCMD
}
|
$OUTCMD
}
}
...
...
bin/epm-sh-functions
View file @
cef80e2e
...
@@ -161,7 +161,7 @@ set_sudo()
...
@@ -161,7 +161,7 @@ set_sudo()
# print options description from HELPCMD/HELPOPT lines in the code
# print options description from HELPCMD/HELPOPT lines in the code
get_help
()
get_help
()
{
{
grep
"#
$1
"
$0
|
while
read
n
;
do
grep
--
"#
$1
"
$0
|
while
read
n
;
do
opt
=
$(
echo
$n
|
sed
-e
"s|) #
$1
:.*||g"
)
opt
=
$(
echo
$n
|
sed
-e
"s|) #
$1
:.*||g"
)
desc
=
$(
echo
$n
|
sed
-e
"s|.*) #
$1
:||g"
)
desc
=
$(
echo
$n
|
sed
-e
"s|.*) #
$1
:||g"
)
printf
" %-20s %s
\n
"
$opt
"
$desc
"
printf
" %-20s %s
\n
"
$opt
"
$desc
"
...
...
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