tazwok rev 559 tip
tazwok: typos
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Nov 09 11:24:59 2021 +0000 (2021-11-09) |
parents | 61b3b07955df |
children | |
files | chroot-scripts/clean-chroot libtazwok/libtazwok-modules/report tazwok |
line diff
1.1 --- a/chroot-scripts/clean-chroot Tue Feb 26 08:31:13 2019 +0100 1.2 +++ b/chroot-scripts/clean-chroot Tue Nov 09 11:24:59 2021 +0000 1.3 @@ -3,6 +3,6 @@ 1.4 # Remove packages which was not in the chroot at creation time. 1.5 for pkg in $(ls /var/lib/tazpkg/installed); do 1.6 [ -d /var/lib/tazpkg/installed/$pkg ] || continue 1.7 - [ "$(grep ^$pkg$ /var/lib/tazpkg/chroot-pkgs)" ] || tazpkg remove $pkg --auto 1.8 + grep -q ^$pkg$ /var/lib/tazpkg/chroot-pkgs || tazpkg remove $pkg --auto 1.9 done 1.10 exit 0
2.1 --- a/libtazwok/libtazwok-modules/report Tue Feb 26 08:31:13 2019 +0100 2.2 +++ b/libtazwok/libtazwok-modules/report Tue Nov 09 11:24:59 2021 +0000 2.3 @@ -262,7 +262,7 @@ 2.4 report_create_html 2.5 ;; 2.6 end-sublog) 2.7 - [ "$log_opt" ] || continue 2.8 + [ "$log_opt" ] || return 2.9 export log_list="${log_list#* }" 2.10 echo '</div>' >> "$log_opt" 2.11 # Grep the summary of sublog (main action + status) and put
3.1 --- a/tazwok Tue Feb 26 08:31:13 2019 +0100 3.2 +++ b/tazwok Tue Nov 09 11:24:59 2021 +0000 3.3 @@ -232,7 +232,7 @@ 3.4 # genpkg_rules: it maybe needs something inside. 3.5 for i in $PACKAGE $(look_for_rwanted); do 3.6 sed -n '/^genpkg_rules\(\)/','/^}/'p $WOK/$i/receipt | \ 3.7 - fgrep -q '$src' && tazwok_warning "Sources will not be removed \ 3.8 + fgrep -q "$src" && tazwok_warning "Sources will not be removed \ 3.9 because $i uses \$src in its receipt." && return 3.10 done 3.11 3.12 @@ -613,7 +613,7 @@ 3.13 unset main_version 3.14 fi 3.15 fi 3.16 - if [ ! "$main_version" ] || [ $(grep -q "^$PACKAGE | $VERSION" $INCOMING_REPOSITORY/packages.desc 2>/dev/null) ]; then 3.17 + if [ ! "$main_version" ] || grep -q "^$PACKAGE | $VERSION" $INCOMING_REPOSITORY/packages.desc 2>/dev/null; then 3.18 if [ -f $src_repository/${SOURCE:-$PACKAGE}-${KBASEVER:-$VERSION}.tar.lzma ]; then 3.19 echo -e "$PACKAGE:incoming\t${SOURCE:-$PACKAGE}-${KBASEVER:-$VERSION}.tar.lzma" >> $src_repository/sources.list 3.20 elif [ -f "$src_repository/$TARBALL" ]; then 3.21 @@ -758,7 +758,7 @@ 3.22 fi 3.23 ;; 3.24 svn*|subversion*) 3.25 - if $(echo "$WGET_URL" | fgrep -q svn); then 3.26 + if echo "$WGET_URL" | fgrep -q svn; then 3.27 file=${WGET_URL#svn|} 3.28 else 3.29 file=${WGET_URL#subversion|} 3.30 @@ -779,7 +779,7 @@ 3.31 fi 3.32 ;; 3.33 hg*|mercurial*) 3.34 - if $(echo "$WGET_URL" | fgrep -q hg); then 3.35 + if echo "$WGET_URL" | fgrep -q hg; then 3.36 file=${WGET_URL#hg|} 3.37 else 3.38 file=${WGET_URL#mercurial|} 3.39 @@ -930,13 +930,13 @@ 3.40 for dir in $fs/bin $fs/sbin $fs/usr/bin $fs/usr/sbin $fs/usr/games 3.41 do 3.42 if [ -d "$dir" ]; then 3.43 - find $dir -type f -exec strip -s '{}' 2>/dev/null \; 3.44 + find $dir -type f -exec strip -s '{}' \; 2>/dev/null 3.45 fi 3.46 done 3.47 3.48 # Libraries. 3.49 - find $fs -name "*.so*" -exec strip -s '{}' 2>/dev/null \; 3.50 - find $fs -name "*.a" -exec strip --strip-debug '{}' 2>/dev/null \; 3.51 + find $fs -name "*.so*" -exec strip -s '{}' \; 2>/dev/null 3.52 + find $fs -name "*.a" -exec strip --strip-debug '{}' \; 2>/dev/null 3.53 report end-step 3.54 } 3.55 3.56 @@ -1113,7 +1113,7 @@ 3.57 # Generate md5 of cooking stuff to look for commit later. 3.58 gen_cookmd5 3.59 echo -e "\n# md5sum of cooking stuff :" >> taz/$PACKAGE-$VERSION/receipt 3.60 - cat md5 | sed 's/^/# /' >> taz/$PACKAGE-$VERSION/receipt 3.61 + sed 's/^/# /' >> taz/$PACKAGE-$VERSION/receipt < md5 3.62 3.63 # Create the files.list by redirecting find output. 3.64 report step "Creating the list of files" 3.65 @@ -1306,7 +1306,7 @@ 3.66 3.67 # Look for removed/update packages. 3.68 touch stamp -r packages.list 3.69 - for PACKAGE in $(grep ^[0-9,a-z,A-Z] packages.txt); do 3.70 + for PACKAGE in $(grep '^[0-9,a-z,A-Z]' packages.txt); do 3.71 pkg="$pkg_repository/$(grep -m1 ^$PACKAGE- packages.list).tazpkg" 3.72 if ! [ -f "$pkg" ]; then 3.73 erase_package_info 3.74 @@ -1432,7 +1432,7 @@ 3.75 cd .. && rm -r "$pkg_files_dir" 3.76 3.77 cd $pkg_repository 3.78 - echo $(basename ${pkg%.tazpkg}) >> packages.list 3.79 + basename ${pkg%.tazpkg} >> packages.list 3.80 [ ! "$package_md5" ] && package_md5=$(md5sum $(basename $pkg)) 3.81 echo "$package_md5" >> packages.md5 3.82 unset package_md5 3.83 @@ -1540,7 +1540,7 @@ 3.84 sort_db() 3.85 { 3.86 report step "Generating cookorder.txt" 3.87 - cat $dep_db | sed 's/ \t / /' | while read PACKAGE BUILD_DEPENDS; do 3.88 + sed 's/ \t / /' < $dep_db | while read PACKAGE BUILD_DEPENDS; do 3.89 grep -q ^$PACKAGE$'\t' $wan_db && continue 3.90 3.91 # Replace each BUILD_DEPENDS with a WANTED package by it's 3.92 @@ -1826,7 +1826,7 @@ 3.93 if [ "$cooklist" ]; then 3.94 mv $tmp/dep $tmp/cooklist 3.95 else 3.96 - cat $tmp/dep | sort -u 3.97 + sort -u < $tmp/dep 3.98 fi 3.99 rm -f $tmp/dep $tmp/list 3.100 sort -o $dep_db $dep_db 3.101 @@ -2281,7 +2281,7 @@ 3.102 SLITAZ_DIR=$SLITAZ_DIR 3.103 SLITAZ_VERSION=$SLITAZ_VERSION 3.104 $( [ "$undigest" ] && echo "undigest=$undigest" ) 3.105 -LOCAL_REPOSITORY=$SLITAZ_DIR/$(if [ "$undigest" ]; then echo '$undigest'; else echo '$SLITAZ_VERSION'; fi) 3.106 +LOCAL_REPOSITORY=$SLITAZ_DIR/$(if [ "$undigest" ]; then echo "$undigest"; else echo "$SLITAZ_VERSION"; fi) 3.107 chroot_dir=\$LOCAL_REPOSITORY/chroot 3.108 3.109 # Default scripts path (these scripts are added to the 3.110 @@ -2355,7 +2355,7 @@ 3.111 for i in $(fgrep -l PROVIDE $WOK/*/receipt); do 3.112 . $i 3.113 case " $PROVIDE " in 3.114 - *\ $1\ *|*\ $1:*) echo $(basename $(dirname $i));; 3.115 + *\ $1\ *|*\ $1:*) basename $(dirname $i);; 3.116 esac 3.117 done 3.118 } 3.119 @@ -2691,7 +2691,7 @@ 3.120 echo -n "$PACKAGE " 3.121 echo -en "\033[24G $VERSION" 3.122 echo -e "\033[42G $CATEGORY" 3.123 - packages=$(($PACKAGEs+1)) 3.124 + packages=$(($packages+1)) 3.125 done 3.126 horizontal_line 3.127 echo "$packages packages found for : $2" 3.128 @@ -3081,7 +3081,7 @@ 3.129 fi 3.130 done 3.131 horizontal_line 3.132 - echo "Maintainers: `cat /tmp/slitaz-maintainers | wc -l`" 3.133 + echo "Maintainers: `wc -l < /tmp/slitaz-maintainers`" 3.134 echo "" 3.135 # Remove tmp files 3.136 rm -f /tmp/slitaz-maintainers 3.137 @@ -3089,7 +3089,7 @@ 3.138 maintained-by) 3.139 # Search for packages maintained by a contributor. 3.140 get_tazwok_config 3.141 - if [ ! -n "$2" ]; then 3.142 + if [ -z "$2" ]; then 3.143 echo "Specify a name or email of a maintainer." >&2 3.144 exit 1 3.145 fi 3.146 @@ -3100,7 +3100,7 @@ 3.147 . $pkg/receipt 3.148 if echo "$MAINTAINER" | fgrep -q "$2"; then 3.149 echo "$PACKAGE" 3.150 - packages=$(($PACKAGEs+1)) 3.151 + packages=$(($packages+1)) 3.152 fi 3.153 done 3.154 horizontal_line 3.155 @@ -3187,8 +3187,8 @@ 3.156 if [ "$missing" ]; then 3.157 pkg=$(ls -1 $WOK) 3.158 else 3.159 - pkg="$({ grep ^[a-zA-Z0-9] $PACKAGES_REPOSITORY/packages.txt 3.160 - grep ^[a-zA-Z0-9] $INCOMING_REPOSITORY/packages.txt 3.161 + pkg="$({ grep '^[a-zA-Z0-9]' $PACKAGES_REPOSITORY/packages.txt 3.162 + grep '^[a-zA-Z0-9]' $INCOMING_REPOSITORY/packages.txt 3.163 } | sort -u)" 3.164 fi 3.165 cooklist=$PACKAGES_REPOSITORY/cooklist 3.166 @@ -3207,8 +3207,8 @@ 3.167 if [ "$missing" ]; then 3.168 pkg=$(ls -1 $WOK) 3.169 else 3.170 - pkg="$({ grep ^[a-zA-Z0-9] $PACKAGES_REPOSITORY/packages.txt 3.171 - grep ^[a-zA-Z0-9] $INCOMING_REPOSITORY/packages.txt 3.172 + pkg="$({ grep '^[a-zA-Z0-9]' $PACKAGES_REPOSITORY/packages.txt 3.173 + grep '^[a-zA-Z0-9]' $INCOMING_REPOSITORY/packages.txt 3.174 } | sort -u)" 3.175 fi 3.176 cooklist=$PACKAGES_REPOSITORY/cooklist 3.177 @@ -3224,8 +3224,8 @@ 3.178 if [ "$missing" ]; then 3.179 pkg=$(ls -1 $WOK) 3.180 else 3.181 - pkg="$({ grep ^[a-zA-Z0-9] $PACKAGES_REPOSITORY/packages.txt 3.182 - grep ^[a-zA-Z0-9] $INCOMING_REPOSITORY/packages.txt 3.183 + pkg="$({ grep '^[a-zA-Z0-9]' $PACKAGES_REPOSITORY/packages.txt 3.184 + grep '^[a-zA-Z0-9]' $INCOMING_REPOSITORY/packages.txt 3.185 } | sort -u)" 3.186 fi 3.187 cooklist=$PACKAGES_REPOSITORY/cooklist