cookutils annotate cooks @ rev 854

Tiny edits
author Paul Issott <paul@slitaz.org>
date Wed Dec 21 17:36:29 2016 +0000 (2016-12-21)
parents 9e21916774fb
children 91d0347ac834
rev   line source
al@850 1 #!/bin/sh
paul@854 2 # Cook specified package and then cook all the split packages
paul@854 3 # that build from the files of just built packages
al@850 4
al@850 5 case "$1" in
al@850 6 --help|-h)
al@850 7 cat <<EOT
al@850 8 Usage: cooks <package>
al@850 9
al@850 10 Cook the specified package and then cook all the packages defined in the
al@850 11 SPLIT variable in the package receipt.
al@850 12 Note, *-dev packages are implicit and usually omitted.
al@850 13
al@850 14 EOT
al@850 15 exit 0
al@850 16 ;;
al@850 17 esac
al@850 18
al@850 19 pkg="$1"
al@850 20 . /etc/slitaz/cook.conf
al@850 21
al@850 22 cook "$pkg"
al@850 23
al@850 24 # Get the list
al@850 25 splitted=$(SPLIT=''; . $WOK/$pkg/receipt; echo $SPLIT)
al@850 26
al@850 27 # $SPLIT may contain the "*-dev" somewhere already if cooking order is significant.
paul@854 28 # Cook the "*-dev" first if order is insignificant.
al@850 29 [ "${splitted/$pkg-dev/}" == "$splitted" ] && splitted="$pkg-dev $splitted"
al@850 30
paul@854 31 # (re-)cook all existing packages
al@850 32 for i in $splitted; do
al@850 33 [ -d "$WOK/$i" ] && cook $i
al@850 34 done
al@850 35
al@850 36 exit 0