21 lines
461 B
Bash
Executable File
21 lines
461 B
Bash
Executable File
#!/bin/sh
|
|
|
|
export LC_ALL=C
|
|
|
|
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 | perl -e '
|
|
while (<>) {
|
|
chomp;m,^/pool/[^/]+/[^/]+/[^/]+/(.*), and print "$1\n";
|
|
}' | sort | gzip -9 > $LISTFILE
|
|
mv $LISTFILE $LISTDIR
|
|
fi
|
|
done
|