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, pretend-build-prerequisites" |
38 |
|
echo " -d --debug enable debug mode" |
39 |
echo |
echo |
40 |
echo "method, name, version and build must be given !" |
echo "method, name, version and build must be given !" |
41 |
echo |
echo |
42 |
exit 1 |
exit 1 |
43 |
} |
} |
44 |
|
|
45 |
|
# always default debug=0 |
46 |
|
DEBUG=0 |
47 |
|
|
48 |
# very basic getops |
# very basic getops |
49 |
for i in $* |
for i in $* |
50 |
do |
do |
54 |
--pver|-v) shift; PVER="$1" ;; |
--pver|-v) shift; PVER="$1" ;; |
55 |
--pbuild|-b) shift; PBUILD="$1" ;; |
--pbuild|-b) shift; PBUILD="$1" ;; |
56 |
--method|-m) shift; METHOD="$1" ;; |
--method|-m) shift; METHOD="$1" ;; |
57 |
|
--debug|-d) shift; DEBUG=1 ;; |
58 |
--help|-h) usage ;; |
--help|-h) usage ;; |
59 |
esac |
esac |
60 |
shift |
shift |
189 |
|
|
190 |
while read SYM DEPNAME |
while read SYM DEPNAME |
191 |
do |
do |
192 |
|
if [[ ${DEBUG} = 1 ]] |
193 |
|
then |
194 |
|
echo "DEBUG: DEPNAME='${DEPNAME}'" >&2 |
195 |
|
fi |
196 |
|
|
197 |
# exclude empty depnames |
# exclude empty depnames |
198 |
[[ -z ${DEPNAME} ]] && continue |
[[ -z ${DEPNAME} ]] && continue |
199 |
|
|
330 |
PBUILD="$(magename2pbuild ${i})" |
PBUILD="$(magename2pbuild ${i})" |
331 |
if [ -z "${list}" ] |
if [ -z "${list}" ] |
332 |
then |
then |
333 |
list="\t${COLBLUE}[${k}] ${COLGREEN}${PCAT}/${PNAME}-${PVER}-${PBUILD}${COLDEFAULT}" |
list="\t${COLBLUE}[${k}] ${COLGREEN}${PCAT}/${PNAME}-${PVER}-${PBUILD}${COLDEFAULT}" |
334 |
else |
else |
335 |
list="${list} |
list="${list} |
336 |
\t${COLBLUE}[${k}] ${COLGREEN}${PCAT}/${PNAME}-${PVER}-${PBUILD}${COLDEFAULT}" |
\t${COLBLUE}[${k}] ${COLGREEN}${PCAT}/${PNAME}-${PVER}-${PBUILD}${COLDEFAULT}" |