diff --git a/build_core.sh b/build_core.sh
index 3abe7de8eecf6be03594d9fa6f121028e1ff13dd..41924d966769cf07128bee1296b24d6a7e63d121 100755
--- a/build_core.sh
+++ b/build_core.sh
@@ -86,8 +86,11 @@ showtitle "Getting gomobile"
 ./golang/go/bin/go install golang.org/x/mobile/cmd/gomobile || quit "./golang/go/bin/go install golang.org/x/mobile/cmd/gomobile"
 
 showtitle "initiating gomobile"
-./golang/bin/gomobile init || quit "./golang/bin/gomobile init"
-
+if [[ -z ${GOBIN} ]]; then
+  ./golang/bin/gomobile init || quit "./golang/bin/gomobile init"
+else
+  $GOBIN/gomobile init ||  quit "$GOBIN/gomobile init"
+fi
 
 # -------- prepare snowflake ---------------
 showtitle "Checking out snowflake repository"
diff --git a/build_core_dev.sh b/build_core_dev.sh
index 8031ef952554edb0e0670929c77c9f21f7101378..b2c1ff960a2777fd7661cbd2dee482ee5970d072 100755
--- a/build_core_dev.sh
+++ b/build_core_dev.sh
@@ -105,7 +105,11 @@ showtitle "Getting gomobile"
 ./golang/go/bin/go install golang.org/x/mobile/cmd/gomobile || quit "./golang/go/bin/go install golang.org/x/mobile/cmd/gomobile"
 
 showtitle "initiating gomobile"
-./golang/bin/gomobile init || quit "./golang/bin/gomobile init"
+if [[ -z ${GOBIN} ]]; then
+  ./golang/bin/gomobile init || quit "./golang/bin/gomobile init"
+else
+  $GOBIN/gomobile init ||  quit "$GOBIN/gomobile init"
+fi