2019-02-19 17:05:47 -01:00
|
|
|
#!/bin/bash
|
2010-11-14 14:13:48 -01:00
|
|
|
|
2012-07-06 00:30:17 +00:00
|
|
|
export LC_ALL=C
|
|
|
|
|
2010-11-14 14:13:48 -01:00
|
|
|
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'`
|
|
|
|
|
2012-07-06 00:30:17 +00:00
|
|
|
isoinfo -fR -i $FILE | perl -e '
|
|
|
|
while (<>) {
|
|
|
|
chomp;m,^/pool/[^/]+/[^/]+/[^/]+/(.*), and print "$1\n";
|
2023-01-23 17:30:35 -01:00
|
|
|
}' | sort | pigz -9nm > $LISTFILE
|
2010-11-14 14:13:48 -01:00
|
|
|
mv $LISTFILE $LISTDIR
|
|
|
|
fi
|
|
|
|
done
|