summaryrefslogtreecommitdiff
path: root/scripts/mkPackages
blob: 5734f1c3376b0a40c1aa6e04ea4f61a4e0658ecc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

for i in *.ipk
do
	packagename=${i%%_*}
	#echo >&2 "$packagename..."
	GOOD=y
	for other in ${packagename}_*
	do
	    if [ $i != $other -a $other -nt $i ]
	    then
		GOOD=
		break
	    fi
	done
	if [ -n "$GOOD" ]
	then
	    tar xfOz $i ./control.tar.gz | tar xfOz - ./control
	    echo
	else
	    echo >&2 "Skipped old file: $i ($other is newer)"
	    #mv $i old
	fi
done >Packages