cookutils annotate cooks @ rev 857

Make "pkgdb" separate module.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Dec 31 04:35:47 2016 +0200 (2016-12-31)
parents b445a91a8be7
children 1520231a65c2
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@850 36 exit 0