blob: f4957004c0ebcabba2b8d301c2888e555929f38b [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001#!/usr/bin/env bash
2
3sourcename="$1"; shift
4
5for pkg in "$@"; do
6 tar -Ozxf "$pkg" ./control.tar.gz 2>/dev/null | tar -Ozxf - ./control 2>/dev/null | \
7 while read field value; do
8 if [ "$field" = "SourceName:" ] && [ "$value" = "$sourcename" ]; then
9 rm -vf "$pkg"
10 break
11 fi
12 done
13 case "$pkg" in
14 */"${sourcename}_"*.ipk)
15 rm -vf "$pkg"
16 ;;
17 esac
18done
19
20exit 0