You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
373 B
20 lines
373 B
#!/usr/bin/env bash
|
|
|
|
sourcename="$1"; shift
|
|
|
|
for pkg in "$@"; do
|
|
tar -Ozxf "$pkg" ./control.tar.gz 2>/dev/null | tar -Ozxf - ./control 2>/dev/null | \
|
|
while read field value; do
|
|
if [ "$field" = "SourceName:" ] && [ "$value" = "$sourcename" ]; then
|
|
rm -vf "$pkg"
|
|
break
|
|
fi
|
|
done
|
|
case "$pkg" in
|
|
*/"${sourcename}_"*.ipk)
|
|
rm -vf "$pkg"
|
|
;;
|
|
esac
|
|
done
|
|
|
|
exit 0
|
|
|