cookutils rev 10
Fiew small fixes
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed May 04 22:30:30 2011 +0200 (2011-05-04) |
parents | 02bf2a847c08 |
children | 92e7565b2519 |
files | cook |
line diff
1.1 --- a/cook Wed May 04 04:30:28 2011 +0200 1.2 +++ b/cook Wed May 04 22:30:30 2011 +0200 1.3 @@ -34,9 +34,9 @@ 1.4 pkglist $(gettext "Create all packages.* lists.") 1.5 1.6 $(echo -e "\033[1m$(gettext "Options:")\033[0m") 1.7 - --clean|-c $(gettext "Clean the package in the wok.") 1.8 - --install|-i $(gettext "Cook and install the package.") 1.9 - --wok|-w $(gettext "Setup also a wok from Hg repo.") 1.10 + --clean|-c Cook : $(gettext "clean the package in the wok.") 1.11 + --install|-i Cook : $(gettext "and install the package.") 1.12 + --wok|-w Setup: $(gettext "create also a wok from Hg repo.") 1.13 1.14 EOT 1.15 exit 0 1.16 @@ -158,8 +158,7 @@ 1.17 else 1.18 url=${WGET_URL#mercurial|} 1.19 fi 1.20 - pkgsrc=$PACKAGE-$VERSION 1.21 - [ "$SOURCE" ] && pkgsrc=$SOURCE-$VERSION 1.22 + pkgsrc=${SOURCE:-$PACKAGE}-$VERSION 1.23 tarball=$pkgsrc.tar.bz2 1.24 gettext "Getting source from Hg: "; echo $url 1.25 gettext "Cloning to: "; echo "$pwd/$pkgsrc" 1.26 @@ -296,7 +295,6 @@ 1.27 # The main cook function. 1.28 cookit() { 1.29 echo "Cooking: $PACKAGE $VERSION" 1.30 - echo "Cooking: $PACKAGE $VERSION" | log 1.31 separator 1.32 set_paths 1.33 [ "$QA" ] && receipt_quality 1.34 @@ -344,7 +342,7 @@ 1.35 # tarball if it exist. 1.36 if [ "$WGET_URL" ] && [ ! -f "$SRC/$TARBALL" ]; then 1.37 if [ -f "$SRC/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" ]; then 1.38 - TARBALL=$SRC/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma 1.39 + TARBALL=${SOURCE:-$PACKAGE}-$VERSION.tar.lzma 1.40 else 1.41 get_source || exit 1 1.42 fi 1.43 @@ -361,10 +359,10 @@ 1.44 gettext -e "Executing: compile_rules\n" 1.45 [ -d "$src" ] && cd $src 1.46 compile_rules || exit 1 1.47 + # Stay compatible with _pkg 1.48 + [ -d $src/_pkg ] && mv $src/_pkg $install 1.49 # QA: compile_rules success so valid. 1.50 mkdir -p $install 1.51 - # Stay compatible with _pkg 1.52 - [ -d $src/_pkg ] && mv $src/_pkg $install 1.53 else 1.54 # QA: No compile_rules so no error, valid. 1.55 mkdir -p $install