summaryrefslogtreecommitdiffstats
path: root/src/ob-buildopk.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/ob-buildopk.sh')
-rw-r--r--src/ob-buildopk.sh30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/ob-buildopk.sh b/src/ob-buildopk.sh
index ab016ff..8ac3ba4 100644
--- a/src/ob-buildopk.sh
+++ b/src/ob-buildopk.sh
@@ -19,6 +19,21 @@
. "${LIBDATADIR}/libopkbuild.${SHSOEXT}.${LIBOPKBUILD_SHSOVERSION}"
+build_opk()
+{
+ binary="${1}"
+ version="${2}"
+ arch="${3}"
+ plat="${4}"
+
+ (cd "${binary}.data" && tar -czf '../data.tar.gz' '.')
+ (cd "${binary}.control" && tar -czf '../control.tar.gz' '.')
+
+ tar -czf "../../${binary}_${version}_${arch}_${plat}.opk" \
+ 'debian-binary' 'data.tar.gz' 'control.tar.gz'
+ rm -Rf 'data.tar.gz' 'control.tar.gz'
+}
+
main()
{
ob_set_text_domain 'opkbuild'
@@ -41,19 +56,4 @@ main()
rm 'debian-binary'
}
-build_opk()
-{
- binary="${1}"
- version="${2}"
- arch="${3}"
- plat="${4}"
-
- (cd "${binary}.data" && tar -czf '../data.tar.gz' '.')
- (cd "${binary}.control" && tar -czf '../control.tar.gz' '.')
-
- tar -czf "../../${binary}_${version}_${arch}_${plat}.opk" \
- 'debian-binary' 'data.tar.gz' 'control.tar.gz'
- rm -Rf 'data.tar.gz' 'control.tar.gz'
-}
-
main "${@}"