Files
opkg-utils/makePackage
Alejandro del Castillo f64b761628 makePackage: switch to python3
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
2019-12-16 16:02:56 -06:00

17 lines
456 B
Python
Executable File

#!/usr/bin/env python3
# The general algorithm this program follows goes like this:
# Run tar to extract control from control.tar.gz from the package.
# Insert the filename, size, and md5 lines before the description.
# Call it like this:
# find . -name \*.opk | xargs -n 1 makePackage > Packages
from __future__ import absolute_import
from __future__ import print_function
import sys
import opkg
fn = sys.argv[1]
pkg = opkg.Package(fn)
print(pkg)