Skip to content

Commit

Permalink
Merge pull request #56 from iotaledger/feat/no-build-flag
Browse files Browse the repository at this point in the history
added no-build flag
  • Loading branch information
shufps authored Dec 1, 2023
2 parents cd7b097 + 21203fd commit ce3f612
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function usage {
echo "-g|--gdb: start speculos with -d (waiting for gdb debugger)"
echo "-a|--analyze run static code analysis"
echo "-v|--variant build for 'iota' or 'shimmer'"
echo "-n|--nobuild don't build the app new"
exit 1
}

Expand Down Expand Up @@ -83,6 +84,7 @@ analysis=0
pull=0
cxlib=""
variant=""
nobuild=0
while (( $# ))
do
case "$1" in
Expand Down Expand Up @@ -122,6 +124,9 @@ do
"-p" | "--pull")
pull=1
;;
"-n" | "--nobuild")
nobuild=1
;;
*)
error "unknown parameter: $1"
;;
Expand Down Expand Up @@ -187,11 +192,13 @@ cmd="make clean && $build_flags make "
cmd+="&& $build_flags make load"
}

docker run \
$extra_args \
--rm -v "$rpath:/app" \
ledger-app-builder \
bash -c "$cmd" || error "building failed"
(( !nobuild )) && {
docker run \
$extra_args \
--rm -v "$rpath:/app" \
ledger-app-builder \
bash -c "$cmd" || error "building failed"
}

(( $load )) && {
# we are finished
Expand Down

0 comments on commit ce3f612

Please sign in to comment.