Skip to content

Commit cc8fba7

Browse files
authored
Merge pull request #163 from smartobjectoriented/162-regression-in-so3usr-buildsh
2 parents 91114ab + 80879f5 commit cc8fba7

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

usr/build.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
function usage {
5+
usage() {
66
echo "$0 [OPTIONS]"
77
echo " -c Clean"
88
echo " -r Release build"
@@ -11,23 +11,23 @@ function usage {
1111
echo " -h Print this help"
1212
}
1313

14-
function install_file_elf {
14+
install_file_elf() {
1515
if [ -f $1 ] ; then
1616
for subfolder_app in $(find build/src -type f -iname "*.elf"); do
1717
mv "$subfolder_app" build/deploy
1818
done
1919
fi
2020
}
2121

22-
function install_file_root {
22+
install_file_root() {
2323
[ -f $1 ] && echo "Installing $1" && cp $1 build/deploy
2424
}
2525

26-
function install_directory_root {
26+
install_directory_root() {
2727
[ -d $1 ] && cp -R $1 build/deploy
2828
}
2929

30-
function install_file_directory {
30+
install_file_directory() {
3131
[ -f $1 ] && echo "Installing $1 into $2" && mkdir -p build/deploy/$2 && cp $1 build/deploy/$2
3232
}
3333

@@ -61,10 +61,10 @@ ORIGINAL_WD=$(pwd)
6161
SCRIPT=$(readlink -f $0)
6262
SCRIPTPATH=`dirname $SCRIPT`
6363
64-
if [ $clean == y ]; then
64+
if [ $clean = y ]; then
6565
echo "Cleaning $SCRIPTPATH/build"
6666
rm -rf $SCRIPTPATH/build
67-
if [ "$PLATFORM" == "virt64" ]; then
67+
if [ "$PLATFORM" = "virt64" ]; then
6868
echo "Cleaning microPython"
6969
cd src/micropython/ports/soo
7070
make clean
@@ -73,7 +73,7 @@ if [ $clean == y ]; then
7373
exit
7474
fi
7575
76-
if [ $debug == y ]; then
76+
if [ $debug = y ]; then
7777
build_type="Debug"
7878
else
7979
build_type="Release"
@@ -84,9 +84,9 @@ mkdir -p $SCRIPTPATH/build
8484
8585
cd $SCRIPTPATH/build
8686
87-
if [ "$PLATFORM" == "virt32" -o "$PLATFORM" == "vexpress" -o "$PLATFORM" == "rpi4" ]; then
87+
if [ "$PLATFORM" = "virt32" -o "$PLATFORM" = "vexpress" -o "$PLATFORM" = "rpi4" ]; then
8888
default_toolchain="arm_toolchain.cmake"
89-
elif [ "$PLATFORM" == "virt64" -o "$PLATFORM" == "rpi4_64" ]; then
89+
elif [ "$PLATFORM" = "virt64" -o "$PLATFORM" = "rpi4_64" ]; then
9090
default_toolchain="aarch64_toolchain.cmake"
9191
elif [ -z "$USR_BUILD_TOOLCHAIN_FILE" ]; then
9292
# Only fail if no custom toolchain is provided
@@ -100,13 +100,13 @@ toolchain_file="${USR_BUILD_TOOLCHAIN_FILE:-$default_toolchain}"
100100
# Run cmake with the selected toolchain
101101
cmake -Wno-dev --no-warn-unused-cli -DCMAKE_BUILD_TYPE=$build_type -DCMAKE_TOOLCHAIN_FILE=../"$toolchain_file" ..
102102
103-
if [ $singlecore == y ]; then
103+
if [ $singlecore = y ]; then
104104
NRPROC=1
105105
else
106106
NRPROC=$(nproc)
107107
fi
108108
109-
if [ $verbose == y ]; then
109+
if [ $verbose = y ]; then
110110
make VERBOSE=1 -j1
111111
else
112112
make -j$NRPROC

0 commit comments

Comments
 (0)