|
Last change
on this file since 655dec8 was b09bfb13, checked in by Thorsten Glaser <tg@…>, 19 years ago |
|
why were we still using the python ipkg-make-index even if we
already had a shell one and weren't scan-tools.sh'ing for python
existence any more? right, because it had bugs…
while here, remove the executable bit from the script and call
it with the proper shell, convert to bash, fix output to be
about the same as from the python script
git-svn-id: svn://www.freewrt.org/trunk/freewrt@2287 afb5a338-a214-0410-bd46-81f09a774fd1
|
-
Property mode
set to
100644
|
|
File size:
517 bytes
|
| Line | |
|---|
| 1 | set -e
|
|---|
| 2 |
|
|---|
| 3 | pkg_dir=$1
|
|---|
| 4 |
|
|---|
| 5 | if [[ -z $pkg_dir || ! -d $pkg_dir ]]; then
|
|---|
| 6 | echo "Usage: ipkg-make-index <package_directory>"
|
|---|
| 7 | exit 1
|
|---|
| 8 | fi
|
|---|
| 9 |
|
|---|
| 10 | find "$pkg_dir" -name '*.ipk' | sort | while IFS= read pkg; do
|
|---|
| 11 | dpkg=${pkg##*/}
|
|---|
| 12 | echo "Generating index for package $dpkg" >&2
|
|---|
| 13 | file_size=$(ls -l $pkg | awk '{print $5}')
|
|---|
| 14 | md5sum=$(md5sum $pkg)
|
|---|
| 15 | tar -xzOf "$pkg" ./control.tar.gz | \
|
|---|
| 16 | tar -xzOf - ./control | \
|
|---|
| 17 | sed -e "s^Description:Filename: $dpkg\\
|
|---|
| 18 | Size: $file_size\\
|
|---|
| 19 | MD5Sum: ${md5sum%% *}\\
|
|---|
| 20 | Description:"
|
|---|
| 21 | echo ""
|
|---|
| 22 | done
|
|---|
| 23 | exit 0
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.