12 |
echo " -b BUILD searches for build number BUILD, needs -n -v" |
echo " -b BUILD searches for build number BUILD, needs -n -v" |
13 |
echo " -c CAT shows all packages of given categorie" |
echo " -c CAT shows all packages of given categorie" |
14 |
echo " -i shows an inventory of all installed packages" |
echo " -i shows an inventory of all installed packages" |
15 |
echo " -f PATH searches packages name in given path" |
echo " -f PATH searches package names in given path" |
16 |
echo |
echo |
17 |
echo " Examples:" |
echo " Examples:" |
18 |
echo |
echo |
26 |
SEARCH_ONLY_PATH=false |
SEARCH_ONLY_PATH=false |
27 |
SEARCH_ONLY_CAT=false |
SEARCH_ONLY_CAT=false |
28 |
|
|
29 |
while getopts "n:v:b:f:c:hi-" opt ; do |
while getopts "n:v:b:f:c:hi-" opt |
30 |
|
do |
31 |
case "${opt}" in |
case "${opt}" in |
32 |
n) |
n) |
33 |
S_PNAME="${OPTARG}" |
S_PNAME="${OPTARG}" |
77 |
unset i pkg |
unset i pkg |
78 |
for i in $(fgrep -rl "${SEARCH_PATH}" ${INSTALLDB}) |
for i in $(fgrep -rl "${SEARCH_PATH}" ${INSTALLDB}) |
79 |
do |
do |
80 |
|
# ignore magefiles! |
81 |
|
case ${i} in |
82 |
|
*.mage) continue ;; |
83 |
|
esac |
84 |
|
|
85 |
# print categorie and pkgname |
# print categorie and pkgname |
86 |
pkg="$(basename ${i%/*/*})/$(basename ${i%/*})" |
pkg="$(basename ${i%/*/*})/$(basename ${i%/*})" |
87 |
if [[ -z $(echo ${S_PACKAGES} | grep ${pkg}) ]] |
if [[ -z $(echo ${S_PACKAGES} | grep ${pkg}) ]] |