5487740b59
git-svn-id: svn://svn.compuextreme.de/Viitor/V962/ViitorMake@6288 504e572c-2e33-0410-9681-be2bf7408885
33 lines
813 B
Bash
Executable File
33 lines
813 B
Bash
Executable File
#!/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
|