From e63eb70b9b77322747c3945f9fb467b59d5a9391 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Fri, 26 Apr 2019 00:33:55 -0400 Subject: src/cmd/opkg.sh: Define functions before references --- (limited to 'src') diff --git a/src/cmd/opkg.sh b/src/cmd/opkg.sh index ff903b3..0da1a8b 100644 --- a/src/cmd/opkg.sh +++ b/src/cmd/opkg.sh @@ -20,6 +20,18 @@ cmd_opkg_opks= +cmd_opkg_fini() +{ + case "${cmd_opkg_opks}" in + *[!\ ]*) + rm -f ${cmd_opkg_opks} + # Hack to avoid this code branch if the function is + # called again in response to a signal. + cmd_opkg_opks='' + ;; + esac +} + cmd_opkg_main() { local root= @@ -101,18 +113,6 @@ cmd_opkg_main() return 0 } -cmd_opkg_fini() -{ - case "${cmd_opkg_opks}" in - *[!\ ]*) - rm -f ${cmd_opkg_opks} - # Hack to avoid this code branch if the function is - # called again in response to a signal. - cmd_opkg_opks='' - ;; - esac -} - cmd_opkg_register() { register_cmd 'opkg' -- cgit v0.9.1