cookutils rev 62
Tiny edits
author | Paul Issott <paul@slitaz.org> |
---|---|
date | Sat May 07 15:22:01 2011 +0100 (2011-05-07) |
parents | 0ffae104a10c |
children | 0a7a4eb83a33 |
files | README cook doc/cookutils.en.html web/cooker.cgi |
line diff
1.1 --- a/README Sat May 07 16:13:17 2011 +0200 1.2 +++ b/README Sat May 07 15:22:01 2011 +0100 1.3 @@ -79,12 +79,12 @@ 1.4 1.5 * activity : Activity information for the web interface 1.6 * blocked : List of manually blocked packages 1.7 - * broken : Broken packages list when cook fail it is add here 1.8 + * broken : Broken packages list, when cook fails it is added here 1.9 * commits : List of packages of the last commit check 1.10 - * cooklist : Cooklist for unbuild packages or custom command 1.11 + * cooklist : Cooklist for unbuilt packages or custom commands 1.12 * cooknotes : All the notes added with 'cooker -n "My note" 1.13 - * installed* : Lists used to compare installed package before a package 1.14 - is cooked and after so we can remove them. 1.15 + * installed* : Lists used to compare installed packages before and after 1.16 + a package is cooked so we can remove them 1.17 1.18 1.19 Toolchain
2.1 --- a/cook Sat May 07 16:13:17 2011 +0200 2.2 +++ b/cook Sat May 07 15:22:01 2011 +0100 2.3 @@ -30,10 +30,10 @@ 2.4 list-wok $(gettext "List packages in the wok.") 2.5 setup $(gettext "Setup your build environment.") 2.6 test $(gettext "Test environment and cook a package.") 2.7 - new $(gettext "Create a new package with receipt".) 2.8 + new $(gettext "Create a new package with a receipt".) 2.9 list $(gettext "Cook a list of packages.") 2.10 clean-wok $(gettext "Clean-up all packages files.") 2.11 - clean-src $(gettext "Clean-up all packages source.") 2.12 + clean-src $(gettext "Clean-up all packages sources.") 2.13 pkglist $(gettext "Create all packages.* lists.") 2.14 2.15 $(echo -e "\033[1m$(gettext "Options:")\033[0m") 2.16 @@ -48,7 +48,7 @@ 2.17 exit 0 2.18 } 2.19 2.20 -# Be sure we root. 2.21 +# Be sure we're root. 2.22 check_root() { 2.23 [ $(id -u) != 0 ] && gettext -e "\nYou must be root to cook.\n\n" && exit 0 2.24 } 2.25 @@ -73,7 +73,7 @@ 2.26 sed s"#^[A-Z]\([^']*\)#$(date '+%Y-%m-%d %H:%M') : \0#" >> $activity 2.27 } 2.28 2.29 -# We dont want those escape in web interface. 2.30 +# We don't want these escapes in web interface. 2.31 clean_log() { 2.32 sed -i -e s'|\[70G\[ \[1;32m| |' \ 2.33 -e s'|\[0;39m \]||' $LOGS/$pkg.log 2.34 @@ -84,7 +84,7 @@ 2.35 echo "$pkg" >> $broken 2.36 } 2.37 2.38 -# Be sure package exist in wok. 2.39 +# Be sure package exists in wok. 2.40 check_pkg_in_wok() { 2.41 if [ ! -d "$WOK/$pkg" ]; then 2.42 gettext -e "\nUnable to find package in the wok:" 2.43 @@ -99,7 +99,7 @@ 2.44 fi 2.45 } 2.46 2.47 -# Initialise files used in $CACHE 2.48 +# Initialize files used in $CACHE 2.49 init_db_files() { 2.50 gettext "Creating directories structure in:"; echo " $SLITAZ" 2.51 mkdir -p $WOK $PKGS $SRC $CACHE $LOGS 2.52 @@ -110,7 +110,7 @@ 2.53 done 2.54 } 2.55 2.56 -# QA: check a receip consistency befor building. 2.57 +# QA: check a receipt consistency before building. 2.58 receipt_quality() { 2.59 gettext -e "QA: checking package receipt...\n" 2.60 unset online 2.61 @@ -130,12 +130,12 @@ 2.62 multimedia office development system-tools security games \ 2.63 misc meta non-free" 2.64 if ! echo "$valid" | grep -q -w "$value"; then 2.65 - gettext "QA: unknow category:"; echo -e " $value\n" 2.66 + gettext "QA: unknown category:"; echo -e " $value\n" 2.67 exit 1 2.68 fi ;; 2.69 WEB_SITE) 2.70 - # We dont check WGET_URL since if dl is needed it will fail. 2.71 - # Break also if we not online. Here error is not fatal. 2.72 + # We don't check WGET_URL since if dl is needed it will fail. 2.73 + # Break also if we're not online. Here error is not fatal. 2.74 if_empty_value 2.75 [ -z "$online" ] || break 2.76 if ! busybox wget -s $value 2>/dev/null; then 2.77 @@ -150,7 +150,7 @@ 2.78 unset DEPENDS BUILD_DEPENDS WANTED EXTRAVERSION WGET_URL PROVIDE TARBALL 2.79 } 2.80 2.81 -# Path's used in receipt and by cook itself. 2.82 +# Paths used in receipt and by cook itself. 2.83 set_paths() { 2.84 pkgdir=$WOK/$PACKAGE 2.85 src=$pkgdir/source/$PACKAGE-$VERSION 2.86 @@ -234,7 +234,7 @@ 2.87 cookdate=$(date "+%Y-%m-%d %H:%M") 2.88 gettext "Summary for:"; echo " $PACKAGE $VERSION" 2.89 separator 2.90 - [ "$prod" ] && echo "Produce : $prod" 2.91 + [ "$prod" ] && echo "Produced : $prod" 2.92 cat << EOT 2.93 Packed : $fs 2.94 Compressed : $size 2.95 @@ -245,7 +245,7 @@ 2.96 EOT 2.97 } 2.98 2.99 -# Display debugging erroe info. 2.100 +# Display debugging error info. 2.101 debug_info() { 2.102 echo -e "\nDebug information" 2.103 separator 2.104 @@ -365,7 +365,7 @@ 2.105 export DESTDIR MAKEFLAGS CFLAGS CXXFLAGS BUILD_HOST CONFIG_SITE 2.106 local LC_ALL=POSIX LANG=POSIX 2.107 2.108 - # Check for build dep. 2.109 + # Check for build deps. 2.110 cd $INSTALLED && ls -1 > $CACHE/installed.list 2.111 [ "$DEPENDS" ] && gettext -e "Checking build dependencies...\n" 2.112 for dep in $BUILD_DEPENDS 2.113 @@ -373,24 +373,24 @@ 2.114 if [ ! -f "$INSTALLED/$dep/receipt" ]; then 2.115 # Try local package first 2.116 if [ -f "$PKGS/$dep-*.tazpkg" ]; then 2.117 - gettext "Installing dep (local):"; echo " $dep" 2.118 + gettext "Installing deps (local):"; echo " $dep" 2.119 cd $PKGS && tazpkg install $dep-*.tazpkg >/dev/null 2.120 else 2.121 - gettext "Installing dep (web/cache):"; echo " $dep" 2.122 + gettext "Installing deps (web/cache):"; echo " $dep" 2.123 tazpkg get-install $dep >/dev/null 2.124 fi 2.125 fi 2.126 done 2.127 ls -1 > $CACHE/installed.cook && cd $CACHE 2.128 2.129 - # If a cook failed deps are not remove since we exit 1. 2.130 + # If a cook failed deps are not removed since we exit 1. 2.131 [ ! -s "installed.diff" ] && \ 2.132 diff installed.list installed.cook > installed.diff 2.133 deps=$(cat installed.diff | grep ^+[a-zA-Z0-9] | wc -l) 2.134 2.135 # Get source tarball and make sure we have source dir named: 2.136 - # $PACKAGE-$VERSION to be standard in receipts. Her we use tar.lzma 2.137 - # tarball if it exist. 2.138 + # $PACKAGE-$VERSION to be standard in receipts. Here we use tar.lzma 2.139 + # tarball if it exists. 2.140 if [ "$WGET_URL" ] && [ ! -f "$SRC/$TARBALL" ]; then 2.141 if [ -f "$SRC/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" ]; then 2.142 TARBALL=${SOURCE:-$PACKAGE}-$VERSION.tar.lzma 2.143 @@ -401,7 +401,7 @@ 2.144 if [ ! "$WANTED" ] && [ "$TARBALL" ] && [ ! -d "$src" ]; then 2.145 mkdir -p $pkgdir/source/tmp && cd $pkgdir/source/tmp 2.146 extract_source || exit 1 2.147 - # Some archives are not well done and dont extract to one dir (ex lzma). 2.148 + # Some archives are not well done and don't extract to one dir (ex lzma). 2.149 files=$(ls | wc -l) 2.150 [ "$files" == 1 ] && mv * ../$PACKAGE-$VERSION 2.151 [ "$files" -gt 1 ] && mkdir -p ../$PACKAGE-$VERSION && \ 2.152 @@ -438,7 +438,7 @@ 2.153 } 2.154 2.155 # Create the package. Wanted to use Tazpkg to create a tazpkg package at first, 2.156 -# but it dont handle EXTRAVERSION. 2.157 +# but it doesn't handle EXTRAVERSION. 2.158 packit() { 2.159 set_paths 2.160 echo "Pack: $PACKAGE $VERSION" 2.161 @@ -457,7 +457,7 @@ 2.162 cp -f ../$file $pack && chown 0.0 $pack/$file && status 2.163 done 2.164 2.165 - # Create files.list with redirecting find outpout. 2.166 + # Create files.list with redirecting find output. 2.167 gettext "Creating the list of files..." && cd $fs 2.168 find . -type f -print > ../files.list 2.169 find . -type l -print >> ../files.list 2.170 @@ -522,7 +522,7 @@ 2.171 separator && gettext "Package:"; echo -e " $tazpkg\n" 2.172 } 2.173 2.174 -# Verify package quality and consitensy. 2.175 +# Verify package quality and consistency. 2.176 packit_quality() { 2.177 if fgrep -q ERROR: $LOGS/$pkg.log; then 2.178 rm -f $command && exit 1 2.179 @@ -570,7 +570,7 @@ 2.180 --wok|-w) 2.181 [ ! -f "$INSTALLED/mercurial/receipt" ] && \ 2.182 tazpkg get-install mercurial 2.183 - [ -d "$WOK" ] && echo -e "A wok already exist.\n" && exit 1 2.184 + [ -d "$WOK" ] && echo -e "A wok already exists.\n" && exit 1 2.185 hg clone $HG_URL ;; 2.186 esac 2.187 2.188 @@ -597,7 +597,7 @@ 2.189 [ -d "${WOK}-hg" ] && WOK=${WOK}-hg 2.190 echo "" 2.191 if [ -d "$WOK/$pkg" ]; then 2.192 - echo -n "$pkg " && gettext "package already exist." 2.193 + echo -n "$pkg " && gettext "package already exists." 2.194 echo -e "\n" && exit 1 2.195 fi 2.196 gettext "Creating"; echo -n " $WOK/$pkg" 2.197 @@ -625,16 +625,16 @@ 2.198 status && echo "" ;; 2.199 clean-src) 2.200 check_root 2.201 - gettext -e "\nCleaning all packages source..." 2.202 + gettext -e "\nCleaning all packages sources..." 2.203 rm -rf $WOK/*/source 2.204 status && echo "" ;; 2.205 pkglist) 2.206 - # Create suitable packages list for TazPKG and only for builded packages. 2.207 + # Create suitable packages list for TazPKG and only for built packages. 2.208 [ "$2" ] && PKGS="$2" 2.209 [ ! -d "$PKGS" ] && \ 2.210 - gettext -e "\nPackages directory dont exist\n\n" && exit 1 2.211 + gettext -e "\nPackages directory doesn't exist\n\n" && exit 1 2.212 cd $PKGS 2.213 - echo "Cook pkglist: Creating all packages list" | log 2.214 + echo "Cook pkglist: Creating all packages lists" | log 2.215 gettext -e "\nCreating lists for:"; echo " $PKGS" 2.216 separator 2.217 rm -f packages.* files.list* 2.218 @@ -715,7 +715,7 @@ 2.219 status && echo "" && exit 0 ;; 2.220 esac 2.221 2.222 - # Check if wanted is build now so we have separate log files. 2.223 + # Check if wanted is built now so we have separate log files. 2.224 if [ "$WANTED" ] && [ ! -d "$WOK/$WANTED/install" ]; then 2.225 cook "$WANTED" 2.226 fi 2.227 @@ -744,7 +744,7 @@ 2.228 cd $PKGS && tazpkg install \ 2.229 $PACKAGE-${VERSION}${EXTRAVERSION}.tazpkg --forced 2.230 else 2.231 - gettext -e "Unable to install package, build have failed.\n\n" 2.232 + gettext -e "Unable to install package, build has failed.\n\n" 2.233 exit 1 2.234 fi 2.235 fi
3.1 --- a/doc/cookutils.en.html Sat May 07 16:13:17 2011 +0200 3.2 +++ b/doc/cookutils.en.html Sat May 07 15:22:01 2011 +0100 3.3 @@ -323,11 +323,11 @@ 3.4 3.5 <h3>Cooker as a Build Bot</h3> 3.6 <p> 3.7 - The Cooker is desingned to be a Built Bot for SliTaz, it means it monitor 3.8 - 2 woks, update the Hg wok, get the differencies and cook all packages that 3.9 - got a commit. To run The Cooker automatically you must use cron and add a 3.10 - single to root crontabs in /var/spool/cron/crontabs. Say you would like 3.11 - to run the Cooker each 2 hours: 3.12 + The Cooker is designed to be a Built Bot for SliTaz, this means it monitors 3.13 + 2 woks, updates the Hg wok, gets the differences and cooks all packages that 3.14 + have been committed. To run The Cooker automatically you must use cron and add a 3.15 + single line to root crontabs in /var/spool/cron/crontabs. Say you would like 3.16 + to run the Cooker every 2 hours: 3.17 </p> 3.18 <pre> 3.19 */2 * * * * /usr/bin/cooker
4.1 --- a/web/cooker.cgi Sat May 07 16:13:17 2011 +0200 4.2 +++ b/web/cooker.cgi Sat May 07 15:22:01 2011 +0100 4.3 @@ -94,7 +94,7 @@ 4.4 fi 4.5 echo '</div>' 4.6 4.7 - # Check for a log file and display summary if exist. 4.8 + # Check for a log file and display summary if it exists. 4.9 if [ -f "$log" ]; then 4.10 if fgrep -q "Summary " $LOGS/$pkg.log; then 4.11 if fgrep -q "cook:$pkg$" $command; then