meta-google: gbmc-update: Fix version output
If we ever have a directory with a VERSION file and version directory,
it will write both versions. This is incorrect behavior.
Change-Id: Ic6737836ab4c59c32dd3d9c78b76f222558d92a4
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh b/meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh
index 87a1219..1831d49 100644
--- a/meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh
+++ b/meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh
@@ -60,13 +60,17 @@
local imgdir="${sig%/*}"
if [ -f "$imgdir/VERSION" ]; then
cat "$imgdir/VERSION" || return
+ return 0
fi
# Staging packages have a directory named after the version
local vdir="${imgdir##*/}"
if [[ "$vdir" =~ ([0-9]+[.]){3}[0-9]+ ]]; then
echo "$vdir"
+ return 0
fi
+
+ return 1
)
GBMC_BR_DHCP_HOOKS+=(gbmc_upgrade_hook)