cookutils diff cooker @ rev 63
cook: add support for git branch so aufs builds
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat May 07 16:31:28 2011 +0200 (2011-05-07) |
parents | 147bded5c460 |
children | ffb061b0826f |
line diff
1.1 --- a/cooker Sat May 07 13:54:00 2011 +0200 1.2 +++ b/cooker Sat May 07 16:31:28 2011 +0200 1.3 @@ -234,7 +234,6 @@ 1.4 mkdir -p $SLITAZ && cd $SLITAZ 1.5 [ -d "${wok}-hg" ] && echo -e "Hg wok already exists.\n" && exit 1 1.6 [ -d "$wok" ] && echo -e "Build wok already exists.\n" && exit 1 1.7 - [ -d "$flavors" ] && echo -e "Flavors repo already exists.\n" && exit 1 1.8 1.9 # Directories and files 1.10 echo "mkdir's and touch files in: $SLITAZ" 1.11 @@ -244,7 +243,7 @@ 1.12 touch $f 1.13 done 1.14 hg clone $WOK_URL ${wok}-hg || exit 1 1.15 - hg clone $FLAVORS_URL flavors 1.16 + [ -d "$flavors" ] || hg clone $FLAVORS_URL flavors 1.17 cp -a ${wok}-hg $wok 1.18 separator && echo "" ;; 1.19 note|-n) 1.20 @@ -306,6 +305,7 @@ 1.21 name="$2" 1.22 [ ! -d "$flavors/$name" ] && \ 1.23 echo -e "\nSpecified flavor does not exist: $name\n" && exit 1 1.24 + [ -d "$flavors/.hg" ] && cd $flavors && hg pull -u 1.25 list=$flavors/$name/packages.list 1.26 cp -a $list $cooklist 1.27 strip_blocked 1.28 @@ -351,11 +351,11 @@ 1.29 separator | tee -a $LOGS/commits.log 1.30 1.31 # Get revisions. 1.32 - cd $wok || ( echo "No wok found: $wok" && exit 1 ) 1.33 + cd $wok || exit 1 1.34 cur=$(hg head --template '{rev}\n') 1.35 echo "Updating Hg wok: ${wok}-hg" | log 1.36 echo "hg:pull" > $command 1.37 - [ -f "${wok}-hg/.hg/hgrc" ] && cd ${wok}-hg && hg pull -u | log_commits 1.38 + cd ${wok}-hg && hg pull -u | log_commits 1.39 new=$(hg head --template '{rev}\n') 1.40 1.41 # Sync build wok with rsync so we don't take care about removing old