Bladeren bron

don't mix indentation methods

Helge Jung 8 jaren geleden
bovenliggende
commit
0de6e12c34
1 gewijzigde bestanden met toevoegingen van 37 en 36 verwijderingen
  1. 37 36
      build.sh

+ 37 - 36
build.sh

@@ -15,16 +15,17 @@
 # TARGETS   = a space separated list of target platforms (if unset, all platforms will be build)
 # PRIORITY  = determines the number of day a rollout phase should last at most
 # VERBOSE   = 0 (default) or 1, call the make commands with 'V=s' to see actual errors better
+# SITE_REPO_FETCH_METHOD = http, everything except "git" will use the HTTP method for fetchting site repo
 #
 
 function get_all_supported_platforms()
 {
-    local buffer;
-    for val in $(ls ${1}) ; do
-        [ -d "./${1}/${val}" ] || continue
+	local buffer;
+	for val in $(ls ${1}) ; do
+		[ -d "./${1}/${val}" ] || continue
 	buffer="${buffer} ${val}"
-    done
-    echo ${buffer}
+	done
+	echo ${buffer}
 }
 
 
@@ -105,8 +106,8 @@ if [ -d "$CODE_DIR/site" ]; then
 fi
 
 if [ ! -d "$CODE_DIR/site" ]; then
-    info "Site repository does not exist, fetching it ..."
-    git clone "$SITE_REPO_URL" "$CODE_DIR/site" || abort "Failed to fetch SITE repository."
+	info "Site repository does not exist, fetching it ..."
+	git clone "$SITE_REPO_URL" "$CODE_DIR/site" || abort "Failed to fetch SITE repository."
 fi
 
 ### CHECKOUT GLUON
@@ -142,8 +143,8 @@ cd ..
 
 ### CLEAN
 if [ -d "./build/" -a "$BRANCH" != "experimental" ]; then
-    progress "Cleaning your build environment ..."
-    make dirclean
+	progress "Cleaning your build environment ..."
+	make dirclean
 fi
 
 ### PREPARE
@@ -153,10 +154,10 @@ make update
 
 # determine VERSION for BRANCH=experimental if it is not set
 if [ "${BRANCH}" == "experimental" -a -z "${VERSION}" ] ; then
-    default_release_pattern=$( awk -F" := " '/^DEFAULT_GLUON_RELEASE/ { gsub("shell ", "", $2); print $2; }' ./site/site.mk )
-    VERSION=$(eval echo ${default_release_pattern})
+	default_release_pattern=$( awk -F" := " '/^DEFAULT_GLUON_RELEASE/ { gsub("shell ", "", $2); print $2; }' ./site/site.mk )
+	VERSION=$(eval echo ${default_release_pattern})
 
-    info "EXPERIMENTAL FIRMWARE: using version tag '$VERSION'"
+	info "EXPERIMENTAL FIRMWARE: using version tag '$VERSION'"
 fi
 
 # set reasonable defaults for unset environment variables
@@ -187,30 +188,30 @@ echo "TS=${BUILD_TS}" >> ${build_info_path}
 progress "Building the firmware - please stand by!"
 
 for target in ${TARGETS} ; do
-    # configure build environment for our current target
-    export GLUON_TARGET="${target}"
-    gluon_build_env_vars="GLUON_TARGET=\"${target}\" GLUON_BRANCH=\"${BRANCH}\" GLUON_RELEASE=\"${VERSION}\" BROKEN=\"${BROKEN}\""
-
-    # prepare build environment for our current target
-    progress "Preparing build environment for target ${target}."
-    [ "${BRANCH}" == "experimental" ] || make clean
-    make -j ${MAKEJOBS} prepare-target${MAKE_PARAM}
-
-    # need to have a toolchain for the particular target 
-    progress "Building toolchain for target ${target}."
-    make -j ${MAKEJOBS} toolchain/install${MAKE_PARAM}
-    [ "$?" -eq "0" ] || abort "Unable to build toolchain for target. Aborting."
-
-    # now we can start building the images for the target platform
-    progress "Building FFPB-flavoured Gluon firmware for target ${target}. You'd better go and fetch some c0ffee!"
-    make_targets="prepare"
-    eval "${gluon_build_env_vars} faketime \"$BUILD_TS\" make -j ${MAKEJOBS} ${make_targets}${MAKE_PARAM}"
-    [ "$?" -eq "0" ] || abort "Failed to build firmware for target-platform ${target}."
-
-    # finally compile the firmware binaries
-    progress "Compiling binary firmware images."
-    faketime "$BUILD_TS" make images${MAKE_PARAM}
-    [ "$?" -eq "0" ] || abort "Failed to assemble images for target-platform ${target}."
+	# configure build environment for our current target
+	export GLUON_TARGET="${target}"
+	gluon_build_env_vars="GLUON_TARGET=\"${target}\" GLUON_BRANCH=\"${BRANCH}\" GLUON_RELEASE=\"${VERSION}\" BROKEN=\"${BROKEN}\""
+
+	# prepare build environment for our current target
+	progress "Preparing build environment for target ${target}."
+	[ "${BRANCH}" == "experimental" ] || make clean
+	make -j ${MAKEJOBS} prepare-target${MAKE_PARAM}
+
+	# need to have a toolchain for the particular target 
+	progress "Building toolchain for target ${target}."
+	make -j ${MAKEJOBS} toolchain/install${MAKE_PARAM}
+	[ "$?" -eq "0" ] || abort "Unable to build toolchain for target. Aborting."
+
+	# now we can start building the images for the target platform
+	progress "Building FFPB-flavoured Gluon firmware for target ${target}. You'd better go and fetch some c0ffee!"
+	make_targets="prepare"
+	eval "${gluon_build_env_vars} faketime \"$BUILD_TS\" make -j ${MAKEJOBS} ${make_targets}${MAKE_PARAM}"
+	[ "$?" -eq "0" ] || abort "Failed to build firmware for target-platform ${target}."
+
+	# finally compile the firmware binaries
+	progress "Compiling binary firmware images."
+	faketime "$BUILD_TS" make images${MAKE_PARAM}
+	[ "$?" -eq "0" ] || abort "Failed to assemble images for target-platform ${target}."
 done
 
 cd ..