18 lines
462 B
Bash
Executable File
18 lines
462 B
Bash
Executable File
#!/bin/sh
|
|
|
|
for FILE in $@; do
|
|
if [ -e "$FILE" ] ; then
|
|
ISODIR=`dirname $FILE`
|
|
LISTDIR=`echo $ISODIR | sed 's/iso-/list-/'`
|
|
if [ ! -d $LISTDIR ] ; then
|
|
mkdir -p $LISTDIR
|
|
fi
|
|
LISTFILE=`echo $FILE | sed 's/\.iso$/.list.gz/g'`
|
|
|
|
isoinfo -fR -i $FILE | grep /pool/ | \
|
|
awk '/\.deb$|\.udeb$|\.tar\.gz$|\.dsc$|\.diff\.gz$/ {gsub(".*/","");print $1}' | \
|
|
LANG=C sort | gzip -9 > $LISTFILE
|
|
mv $LISTFILE $LISTDIR
|
|
fi
|
|
done
|