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, 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 |
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 |
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 |
|
|