initial
git-svn-id: svn://svn.compuextreme.de/Viitor/V962/ViitorMake@6288 504e572c-2e33-0410-9681-be2bf7408885
This commit is contained in:
parent
ad824be7ed
commit
5487740b59
32
Scripts/gen_var_install_contents
Executable file
32
Scripts/gen_var_install_contents
Executable 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
|
Loading…
Reference in New Issue
Block a user