cookutils rev 916
cook: allow include $PACKAGE into $SPLIT to define desired packaging order.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Jun 07 23:53:21 2017 +0300 (2017-06-07) |
parents | d30a093674f6 |
children | a6107ae4375e |
files | cook |
line diff
1.1 --- a/cook Wed Jun 07 22:36:09 2017 +0300 1.2 +++ b/cook Wed Jun 07 23:53:21 2017 +0300 1.3 @@ -355,7 +355,7 @@ 1.4 _ ' # : Packed : Compressed : Files : Package name' 1.5 separator - 1.6 pkgi=1 1.7 - for i in $PACKAGE $SPLIT; do 1.8 + for i in $(all_names); do 1.9 fs=$(du -sh $WOK/$pkg/taz/$i-$VERSION | awk '{print $1}') 1.10 pkgname="$i-$VERSION.tazpkg" 1.11 size=$(ls -lh $PKGS/$pkgname | awk '{print $5}') 1.12 @@ -1079,12 +1079,27 @@ 1.13 } 1.14 1.15 1.16 +# Return all the names of packages bundled in this receipt 1.17 + 1.18 +all_names() { 1.19 + local split=" $SPLIT " 1.20 + if [ "${split/ $PACKAGE /}" != "$split" ]; then 1.21 + # $PACKAGE included somewhere in $SPLIT (probably in the end). 1.22 + # We should build packages in the order defined in the $SPLIT. 1.23 + echo $SPLIT 1.24 + else 1.25 + # We'll build the $PACKAGE, then all defined in the $SPLIT. 1.26 + echo $PACKAGE $SPLIT 1.27 + fi 1.28 +} 1.29 + 1.30 + 1.31 # v2: pack all packages using compiled files 1.32 1.33 packall() { 1.34 set_paths 1.35 if head -n1 "$pkgdir/receipt" | fgrep -q 'v2'; then 1.36 - for i in $PACKAGE $SPLIT; do 1.37 + for i in $(all_names); do 1.38 unset TAGS DEPENDS CAT CONFIG_FILES PROVIDE SUGGESTED DATABASE_FILES TAZPANEL_DAEMON 1.39 packit $i 1.40 done