cookutils annotate cooks @ rev 862

Misc small changes.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Jan 09 04:37:12 2017 +0200 (2017-01-09)
parents 91d0347ac834
children 3f0ca4492ec7
rev   line source
al@850 1 #!/bin/sh
paul@854 2 # Cook specified package and then cook all the split packages
al@857 3 # that build from the files of just built package
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@857 12 Note, *-dev packages are implicit and usually omitted in the SPLIT.
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@862 36 # TODO: check the "split quality": whether the file belongs to a few (or no one) packages
al@862 37
al@850 38 exit 0