Magellan Linux

Diff of /trunk/mage/usr/lib/mage/depwalker.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2210 by niro, Mon Oct 14 13:13:46 2013 UTC revision 2276 by niro, Fri Oct 25 07:53:19 2013 UTC
# Line 27  usage() Line 27  usage()
27   echo "Usage: $(basename $0) [command] [arg] ..."   echo "Usage: $(basename $0) [command] [arg] ..."
28   echo   echo
29   echo "  -h     --help          shows this help"   echo "  -h     --help          shows this help"
30   echo "  -c     --pcat          categorie of the package"   echo "  -c     --pcat          category of the package"
31   echo "  -n     --pname         name of the package"   echo "  -n     --pname         name of the package"
32   echo "  -v     --pver          version number of the package"   echo "  -v     --pver          version number of the package"
33   echo "  -b     --pbuild        build number of the package"   echo "  -b     --pbuild        build number of the package"
34   echo "  -m     --method        which calc method should be used:"   echo "  -m     --method        which calc method should be used:"
35   echo "                         install, srcinstall, depend, srcdepend"   echo "                         install, srcinstall, depend, srcdepend"
36   echo "                         upgrade, srcupgrade,"   echo "                         upgrade, srcupgrade,"
37   echo "                         install-build-prerequisites, pretend-build-prerequisites"   echo "                         install-build-prerequisites,"
38     echo "                         pretend-build-prerequisites"
39     echo "  -d     --debug         enable debug mode"
40   echo   echo
41   echo "method, name, version and build must be given !"   echo "method, category, name, version and build must be given !"
42   echo   echo
43   exit 1   exit 1
44  }  }
45    
46    # always default debug=0
47    DEBUG=0
48    
49  # very basic getops  # very basic getops
50  for i in $*  for i in $*
51  do  do
# Line 50  do Line 55  do
55   --pver|-v) shift; PVER="$1" ;;   --pver|-v) shift; PVER="$1" ;;
56   --pbuild|-b) shift; PBUILD="$1" ;;   --pbuild|-b) shift; PBUILD="$1" ;;
57   --method|-m) shift; METHOD="$1" ;;   --method|-m) shift; METHOD="$1" ;;
58     --debug|-d) shift; DEBUG=1 ;;
59   --help|-h) usage ;;   --help|-h) usage ;;
60   esac   esac
61   shift   shift
# Line 184  depwalking() Line 190  depwalking()
190    
191   while read SYM DEPNAME   while read SYM DEPNAME
192   do   do
193     if [[ ${DEBUG} = 1 ]]
194     then
195     echo "DEBUG: DEPNAME='${DEPNAME}'" >&2
196     fi
197    
198   # exclude empty depnames   # exclude empty depnames
199   [[ -z ${DEPNAME} ]] && continue   [[ -z ${DEPNAME} ]] && continue
200    
# Line 320  then Line 331  then
331   PBUILD="$(magename2pbuild ${i})"   PBUILD="$(magename2pbuild ${i})"
332   if [ -z "${list}" ]   if [ -z "${list}" ]
333   then   then
334   list="\t${COLBLUE}[${k}] ${COLGREEN}${PCAT}/${PNAME}-${PVER}-${PBUILD}${COLDEFAULT}"   list="\t${COLBLUE}[${k}] ${COLGREEN}${PCAT}/${PNAME}-${PVER}-${PBUILD}${COLDEFAULT}"
335   else   else
336   list="${list}   list="${list}
337  \t${COLBLUE}[${k}] ${COLGREEN}${PCAT}/${PNAME}-${PVER}-${PBUILD}${COLDEFAULT}"  \t${COLBLUE}[${k}] ${COLGREEN}${PCAT}/${PNAME}-${PVER}-${PBUILD}${COLDEFAULT}"

Legend:
Removed from v.2210  
changed lines
  Added in v.2276