From 68de1b39647a46ec35d2b48c84a7d2764f90e424 Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@robotics.uk.to>
Date: Wed, 28 Sep 2016 16:06:27 +0100
Subject: [PATCH] Get the architecture if it isn't specified

---
 src/freedombone-app-gogs | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/freedombone-app-gogs b/src/freedombone-app-gogs
index a2c8decbc..8bb9cf1f3 100755
--- a/src/freedombone-app-gogs
+++ b/src/freedombone-app-gogs
@@ -54,6 +54,17 @@ function gogs_parameters {
         CURR_ARCH=arm
     fi
     if [ ! $CURR_ARCH ]; then
+        echo $'No architecture specified'
+        ARCHITECTURE=$(uname -m)
+        if [[ $ARCHITECTURE == "arm"* ]]; then
+            CURR_ARCH=arm
+        fi
+        if [[ $ARCHITECTURE == "amd"* ]]; then
+            CURR_ARCH=amd64
+        fi
+        if [[ $ARCHITECTURE == *"386" || $ARCHITECTURE == *"686" ]]; then
+            CURR_ARCH=386
+        fi
         return
     fi
 
-- 
GitLab