|
Last change
on this file since 8652 was 4890, checked in by obi, 15 years ago |
|
[ipk] fix executable rights
|
-
Property svn:executable
set to
*
|
|
File size:
556 bytes
|
| Line | |
|---|
| 1 | #!/usr/bin/env python2.1
|
|---|
| 2 |
|
|---|
| 3 | import sys, os
|
|---|
| 4 | from glob import glob
|
|---|
| 5 | import commands
|
|---|
| 6 | import ipkg
|
|---|
| 7 |
|
|---|
| 8 | pkg_dir=sys.argv[1]
|
|---|
| 9 | pkg_filename = sys.argv[2]
|
|---|
| 10 |
|
|---|
| 11 | if ( not pkg_dir or not pkg_filename ):
|
|---|
| 12 | sys.stderr.write("Usage: ipkg-update-index <package_directory> <pkgfilename>\n")
|
|---|
| 13 | sys.exit(1)
|
|---|
| 14 |
|
|---|
| 15 | packages = ipkg.Packages()
|
|---|
| 16 |
|
|---|
| 17 | packages.read_packages_file(pkg_dir + '/Packages')
|
|---|
| 18 |
|
|---|
| 19 | names = packages.packages.keys()
|
|---|
| 20 |
|
|---|
| 21 | packages.add_package(ipkg.Package(pkg_filename))
|
|---|
| 22 |
|
|---|
| 23 | packages.write_packages_file(pkg_dir + '/Packages.new')
|
|---|
| 24 | os.rename(pkg_dir + '/Packages.new', pkg_dir + '/Packages')
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.