slitaz-arm diff sat @ rev 214
tazbian: typo
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu May 05 17:03:59 2016 +0200 (2016-05-05) |
parents | 7f8c51f837a5 |
children | 3d01fa704e91 |
line diff
1.1 --- a/sat Fri Apr 18 02:46:52 2014 +0200 1.2 +++ b/sat Thu May 05 17:03:59 2016 +0200 1.3 @@ -56,6 +56,10 @@ 1.4 EOT 1.5 } 1.6 1.7 +error() { 1.8 + echo "[ $(colorize 31 'ERROR') ] $@" 1.9 +} 1.10 + 1.11 # --> use libpkg.sh when released (function is shared with spk) 1.12 # Check mirror ID: return 1 if no changes or mirror unreachable 1.13 check_mirror_id() { 1.14 @@ -86,6 +90,12 @@ 1.15 separator 1.16 rm -rf ${distro} && mkdir -p ${rootfs} ${cache} 1.17 1.18 + # We need a valid flavor 1.19 + if [ "$flavor" ] && [ ! -f "$flavors/$flavor/packages.list" ]; then 1.20 + error "Missing '$flavor' flavor packages.list" 1.21 + newline && exit 1 1.22 + fi 1.23 + 1.24 # Get --flavor= packages lists 1.25 if [ "$flavor" ]; then 1.26 echo -n "Getting $flavor packages.list..."