slitaz-forge annotate mirror/info/bin/chksrc @ rev 393
roadmap: add task publish new cooking
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Jan 08 01:17:09 2014 +0100 (2014-01-08) |
parents | d2d6aee377d5 |
children | 40ad99b9e839 |
rev | line source |
---|---|
pascal@364 | 1 #!/bin/sh |
pascal@364 | 2 |
pascal@364 | 3 . /etc/tazwok.conf |
pascal@364 | 4 WOK=/home/slitaz/${1:-cooking}/wok |
pascal@380 | 5 SRC=/var/www/slitaz/mirror/sources/packages-${1:-cooking} |
pascal@380 | 6 SRC2=/var/www/slitaz/mirror/sources/packages |
pascal@364 | 7 |
pascal@364 | 8 for i in $WOK/*/receipt ; do |
pascal@380 | 9 unset TARBALL EXTRA_SOURCE_FILES WGET_URL WANTED PACKAGE VERSION |
pascal@364 | 10 . $i |
pascal@364 | 11 [ -n "$WANTED" ] && continue |
pascal@381 | 12 if [ -z "$TARBALL$EXTRA_SOURCE_FILES" ]; then |
pascal@380 | 13 [ -n "$WGET_URL" ] || continue |
pascal@380 | 14 echo $(basename ${i%/receipt}) >> /tmp/notarball$$ |
pascal@380 | 15 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
pascal@380 | 16 fi |
pascal@364 | 17 [ -n "$WGET_URL" ] && echo $WGET_URL >> /tmp/wget_url$$ |
pascal@381 | 18 for j in $TARBALL $EXTRA_SOURCE_FILES ; do |
pascal@364 | 19 basename $j |
pascal@364 | 20 done |
pascal@364 | 21 done | sort | uniq > /tmp/tarball$$ |
pascal@380 | 22 if [ -s /tmp/notarball$$ ]; then |
pascal@380 | 23 echo $(cat /tmp/notarball$$ 2> /dev/null) | \ |
pascal@380 | 24 sed 's/ /, /g;s/^/No TARBALL for /' |
pascal@380 | 25 rm -f /tmp/notarball$$ |
pascal@380 | 26 fi |
pascal@364 | 27 while read file; do |
pascal@364 | 28 [ -s $SRC/${file:0:1}/$file ] || [ -s $SRC/${file:0:1}/${file%.*}.lzma ] || |
pascal@364 | 29 [ -s $SRC/${file:0:1}/${file%.*}.tar.lzma ] || |
pascal@364 | 30 echo -e "Missing: $file\nURL: $(grep $file$ /tmp/wget_url$$ | sed q)" |
pascal@364 | 31 done < /tmp/tarball$$ |
pascal@364 | 32 for i in $SRC/?/* ; do |
pascal@364 | 33 [ -f "$i" ] || continue |
pascal@364 | 34 j=$(basename $i) |
pascal@364 | 35 [ -f $SRC2/${j:0:1}/$j ] || ln $i $SRC2/${j:0:1}/$j |
pascal@364 | 36 case "$i" in |
pascal@364 | 37 *lzma) |
pascal@364 | 38 grep -q ^$(basename ${i%lzma}) /tmp/tarball$$ && continue |
pascal@364 | 39 [ $(ls ${i%lzma}* | wc -l) -ne 1 ] && ls ${i%lzma}* | cat |
pascal@364 | 40 ;; |
pascal@364 | 41 *) |
pascal@364 | 42 grep -q ^$(basename $i)$ /tmp/tarball$$ && continue |
pascal@364 | 43 ;; |
pascal@364 | 44 esac |
pascal@364 | 45 echo $i |
pascal@364 | 46 done |
pascal@364 | 47 rm -f /tmp/tarball$$ /tmp/wget_url$$ |
pascal@364 | 48 for i in $SRC2/?/* ; do |
pascal@364 | 49 [ $(stat -c "%h" $i) -eq 1 ] && echo $i |
pascal@364 | 50 done |