🧑💻 Fix build_all_examples
This commit is contained in:
parent
0c3d1cf566
commit
4309e6ab76
|
@ -14,7 +14,9 @@
|
||||||
# build_all_examples [...] branch [resume-from]
|
# build_all_examples [...] branch [resume-from]
|
||||||
#
|
#
|
||||||
|
|
||||||
. mfutil
|
HERE=`dirname $0`
|
||||||
|
|
||||||
|
. "$HERE/mfutil"
|
||||||
|
|
||||||
GITREPO=https://github.com/MarlinFirmware/Configurations.git
|
GITREPO=https://github.com/MarlinFirmware/Configurations.git
|
||||||
STAT_FILE=./.pio/.buildall
|
STAT_FILE=./.pio/.buildall
|
||||||
|
@ -123,7 +125,7 @@ CONF_TREE=$( ls -d "$TMP"/config/examples/*/ "$TMP"/config/examples/*/*/ "$TMP"/
|
||||||
for CONF in $CONF_TREE ; do
|
for CONF in $CONF_TREE ; do
|
||||||
|
|
||||||
# Get a config's directory name
|
# Get a config's directory name
|
||||||
DIR=$( echo $CONF | sed "s|$TMP/config/examples/||" )
|
DIR=$( echo $CONF | "$SED" "s|$TMP/config/examples/||" )
|
||||||
|
|
||||||
# If looking for a config, skip others
|
# If looking for a config, skip others
|
||||||
[[ $FIRST_CONF ]] && [[ $FIRST_CONF != $DIR && "$FIRST_CONF/" != $DIR ]] && continue
|
[[ $FIRST_CONF ]] && [[ $FIRST_CONF != $DIR && "$FIRST_CONF/" != $DIR ]] && continue
|
||||||
|
|
|
@ -5,7 +5,9 @@
|
||||||
# Usage: build_example internal config-home config-folder
|
# Usage: build_example internal config-home config-folder
|
||||||
#
|
#
|
||||||
|
|
||||||
. mfutil
|
HERE=`dirname $0`
|
||||||
|
|
||||||
|
. "$HERE/mfutil"
|
||||||
|
|
||||||
# Require 'internal' as the first argument
|
# Require 'internal' as the first argument
|
||||||
[[ "$1" == "internal" ]] || { echo "Don't call this script directly, use build_all_examples instead." ; exit 1 ; }
|
[[ "$1" == "internal" ]] || { echo "Don't call this script directly, use build_all_examples instead." ; exit 1 ; }
|
||||||
|
@ -36,6 +38,6 @@ unset IFS; set +f
|
||||||
echo -e "\n#define NO_CONTROLLER_CUSTOM_WIRING_WARNING" >> Marlin/Configuration.h
|
echo -e "\n#define NO_CONTROLLER_CUSTOM_WIRING_WARNING" >> Marlin/Configuration.h
|
||||||
|
|
||||||
echo "Building the firmware now..."
|
echo "Building the firmware now..."
|
||||||
$HERE/mftest -s -a -n1 || { echo "Failed"; exit 1; }
|
"$HERE/mftest" -s -a -n1 || { echo "Failed"; exit 1; }
|
||||||
|
|
||||||
echo "Success"
|
echo "Success"
|
||||||
|
|
|
@ -7,13 +7,12 @@
|
||||||
which curl 1>/dev/null 2>&1 || { echo "curl not found! Please install it."; exit ; }
|
which curl 1>/dev/null 2>&1 || { echo "curl not found! Please install it."; exit ; }
|
||||||
which git 1>/dev/null 2>&1 || { echo "git not found! Please install it."; exit ; }
|
which git 1>/dev/null 2>&1 || { echo "git not found! Please install it."; exit ; }
|
||||||
|
|
||||||
SED=$(command -v gsed 2>/dev/null || command -v sed 2>/dev/null)
|
SED=$(which gsed sed | head -n1)
|
||||||
[[ -z "$SED" ]] && { echo "No sed found, please install sed" ; exit 1 ; }
|
[[ -z "$SED" ]] && { echo "No sed found, please install sed" ; exit 1 ; }
|
||||||
|
|
||||||
OPEN=$( which gnome-open xdg-open open | head -n1 )
|
OPEN=$( which gnome-open xdg-open open | head -n1 )
|
||||||
|
|
||||||
SELF=`basename "$0"`
|
SELF=`basename "$0"`
|
||||||
HERE=`dirname "$0"`
|
|
||||||
|
|
||||||
# Check if called in the right location
|
# Check if called in the right location
|
||||||
[[ -e "Marlin/src" ]] || { echo -e "This script must be called from a Marlin working copy with:\n ./buildroot/bin/$SELF $1" ; exit ; }
|
[[ -e "Marlin/src" ]] || { echo -e "This script must be called from a Marlin working copy with:\n ./buildroot/bin/$SELF $1" ; exit ; }
|
||||||
|
|
Loading…
Reference in a new issue