Get the architecture if it isn't specified

This commit is contained in:
Bob Mottram 2016-09-28 16:06:27 +01:00
parent 1dbd1b1606
commit 68de1b3964
1 changed files with 11 additions and 0 deletions

View File

@ -54,6 +54,17 @@ function gogs_parameters {
CURR_ARCH=arm CURR_ARCH=arm
fi fi
if [ ! $CURR_ARCH ]; then 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 return
fi fi