mirror of https://github.com/hak5/openwrt.git
16 lines
302 B
Plaintext
16 lines
302 B
Plaintext
|
#!/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
|
||
|
done
|
||
|
|
||
|
exit 0
|