ubuntu-bots/PackageInfo/update_apt_file

21 lines
440 B
Plaintext
Raw Normal View History

2007-02-04 17:35:40 +00:00
#!/bin/bash
2009-01-19 22:26:32 +00:00
if [ -x "$(which apt-file)" ]; then
echo "Please install apt-file"
exit 1
fi
DIR=/home/bot/data/apt
2007-02-04 17:35:40 +00:00
for DIST in "$DIR"/*.list; do
2008-01-19 17:57:32 +00:00
test -h $DIST && continue
2007-02-04 17:35:40 +00:00
DIST=${DIST:${#DIR}}
DIST=${DIST/.list}
mkdir -p "$DIR/apt-file/$DIST"
apt-file -l -c "$DIR/apt-file/$DIST" -s "$DIR/$DIST.list" update >/dev/null 2>&1
RET=$?
if [ ! $RET ]; then
echo "apt-file failed for $DIST!"
fi
done