# HG changeset patch # User Christophe Lincoln # Date 1304774574 -7200 # Node ID 107e1375ceef58b42a28d2b5c452a3706a90daeb # Parent e72b406b4f0c260d696b09a93fbd8639e906695b Small imrovments to cook and cooker diff -r e72b406b4f0c -r 107e1375ceef cook --- a/cook Sat May 07 14:33:44 2011 +0200 +++ b/cook Sat May 07 15:22:54 2011 +0200 @@ -586,6 +586,7 @@ # Create the package folder and an empty receipt. pkg="$2" [ "$pkg" ] || usage + [ -d "${WOK}-hg" ] && WOK=${WOK}-hg echo "" if [ -d "$WOK/$pkg" ]; then echo -n "$pkg " && gettext "package already exist." diff -r e72b406b4f0c -r 107e1375ceef cooker --- a/cooker Sat May 07 14:33:44 2011 +0200 +++ b/cooker Sat May 07 15:22:54 2011 +0200 @@ -234,7 +234,6 @@ mkdir -p $SLITAZ && cd $SLITAZ [ -d "${wok}-hg" ] && echo -e "Hg wok already exists.\n" && exit 1 [ -d "$wok" ] && echo -e "Build wok already exists.\n" && exit 1 - [ -d "$flavors" ] && echo -e "Flavors repo already exists.\n" && exit 1 # Directories and files echo "mkdir's and touch files in: $SLITAZ" @@ -244,7 +243,7 @@ touch $f done hg clone $WOK_URL ${wok}-hg || exit 1 - hg clone $FLAVORS_URL flavors + [ -d "$flavors" ] || hg clone $FLAVORS_URL flavors cp -a ${wok}-hg $wok separator && echo "" ;; note|-n) @@ -306,6 +305,7 @@ name="$2" [ ! -d "$flavors/$name" ] && \ echo -e "\nSpecified flavor does not exist: $name\n" && exit 1 + [ -d "$flavors/.hg" ] && cd $flavors && hg pull -u list=$flavors/$name/packages.list cp -a $list $cooklist strip_blocked @@ -351,11 +351,11 @@ separator | tee -a $LOGS/commits.log # Get revisions. - cd $wok || ( echo "No wok found: $wok" && exit 1 ) + cd $wok || exit 1 cur=$(hg head --template '{rev}\n') echo "Updating Hg wok: ${wok}-hg" | log echo "hg:pull" > $command - [ -f "${wok}-hg/.hg/hgrc" ] && cd ${wok}-hg && hg pull -u | log_commits + cd ${wok}-hg && hg pull -u | log_commits new=$(hg head --template '{rev}\n') # Sync build wok with rsync so we don't take care about removing old