git-svn-id: svn://svn.compuextreme.de/Viitor/V962/ViitorMake@6288 504e572c-2e33-0410-9681-be2bf7408885
This commit is contained in:
Segler 2011-12-05 16:55:10 +00:00
parent ad824be7ed
commit 5487740b59

View File

@ -0,0 +1,32 @@
#!/bin/bash
FTP_PATH=/ftp/pub/ViitorLinux/V962/PIV/BINARY/
INST_PATH=/mnt/Viitor/DISTRIBUTION/
cd /var/install
mv contents contents.`date +%s`
touch contents
for PACKAGE in `find . -maxdepth 1 -type d -name '??*' | sed -e "s/\.\///g"`; do
echo -e -n $PACKAGE"\t\t\t"
PACKAGEFILE=`find $FTP_PATH $INST_PATH -name $PACKAGE.vpg | head --lines=1`
if [ "x${PACKAGEFILE}x" == "xx" ]; then
echo "NOT FOUND"
else
echo "FOUND"
HEADER=`head --lines=1 $PACKAGEFILE`
COUNT=0
SUM=0
for i in $HEADER; do
if [ $COUNT -lt 4 ]; then
COUNT=$(( $COUNT + 1 ))
SUM=$(( $SUM + $i ))
SIZE=$i
fi
done
tail --lines=+2 `find $FTP_PATH $INST_PATH -name $PACKAGE.vpg | head --lines=1` | head --bytes=$SUM | tail --bytes=$SIZE | bunzip2 -c >>contents
fi
done