5 if [[ -z $pkg_dir ||
! -d $pkg_dir ]]; then
6 echo "Usage: ipkg-make-index <package_directory>"
10 find "$pkg_dir" -name '*.ipk' |
sort |
while IFS
= read pkg
; do
12 echo "Generating index for package $dpkg" >&2
13 file_size
=$
(ls -l $pkg |
awk '{print $5}')
15 tar -xzOf "$pkg" .
/control.
tar.gz | \
16 tar -xzOf - .
/control | \
17 sed -e "s\x01^Description:\x01Filename: $dpkg\\
19 MD5Sum: ${md5sum%% *}\\