summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/opkbuild.sh72
1 files changed, 36 insertions, 36 deletions
diff --git a/src/opkbuild.sh b/src/opkbuild.sh
index cefcc78..de69d5d 100644
--- a/src/opkbuild.sh
+++ b/src/opkbuild.sh
@@ -46,42 +46,6 @@ opt_check_build_deps=
opt_clean=
opt_uid0_cmd=
-main()
-{
- ob_set_text_domain 'opkbuild'
-
- get_options "${@}"
- shift $(($OPTIND - 1))
- if [ ${#} -ne 0 ]; then
- usage
- exit 1
- fi
-
- test_uid0_cmd
-
- setup_arch_plat
-
- make_work_area
-
- setup_package
-
- if [ "${opt_build}" = 'source' -o "${opt_build}" = 'full' ]; then
- build_source
- fi
-
- if [ "${opt_build}" != 'source' ]; then
- print_arch_stats
- if "${opt_check_build_deps}"; then
- if ! "${BINDIR}/ob-checkbuilddeps"; then
- exit 1
- fi
- fi
- setup_build
- build
- clean
- fi
-}
-
usage()
{
printf "$(ob_get_msg 'usage')\n" 'opkbuild'
@@ -381,4 +345,40 @@ clean()
fi
}
+main()
+{
+ ob_set_text_domain 'opkbuild'
+
+ get_options "${@}"
+ shift $(($OPTIND - 1))
+ if [ ${#} -ne 0 ]; then
+ usage
+ exit 1
+ fi
+
+ test_uid0_cmd
+
+ setup_arch_plat
+
+ make_work_area
+
+ setup_package
+
+ if [ "${opt_build}" = 'source' -o "${opt_build}" = 'full' ]; then
+ build_source
+ fi
+
+ if [ "${opt_build}" != 'source' ]; then
+ print_arch_stats
+ if "${opt_check_build_deps}"; then
+ if ! "${BINDIR}/ob-checkbuilddeps"; then
+ exit 1
+ fi
+ fi
+ setup_build
+ build
+ clean
+ fi
+}
+
main "${@}"