Skip to content

Commit

Permalink
Fix how arguments get passed into bash scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
waltjohnson committed Apr 2, 2024
1 parent 8dafaf2 commit beb4065
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
4 changes: 1 addition & 3 deletions scripts/build_cltool.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#!/bin/bash

args="${@:1}" # All arguments

pushd "$(dirname "$(realpath $0)")" > /dev/null

source ./build_test_cmake.sh

build_cmake "cltool" ../cltool ${args}
build_cmake "cltool" ../cltool "$@"

popd > /dev/null

Expand Down
4 changes: 1 addition & 3 deletions scripts/build_run_cltool.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

args="${@:1}" # All arguments

pushd "$(dirname "$(realpath $0)")" > /dev/null

source ./build_test_cmake.sh
Expand All @@ -10,7 +8,7 @@ source ./build_test_cmake.sh
# Builds and Tests
###############################################################################

build_cmake "cltool" ../cltool ${args}
build_cmake "cltool" ../cltool "$@"

./run_cltool.sh

Expand Down
4 changes: 1 addition & 3 deletions scripts/build_unit_tests.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#!/bin/bash

args="${@:1}" # All arguments

pushd "$(dirname "$(realpath $0)")" > /dev/null

source ./build_test_cmake.sh

build_cmake "SDK Unit Tests" ../tests ${args}
build_cmake "SDK Unit Tests" ../tests "$@"

popd > /dev/null

Expand Down
4 changes: 1 addition & 3 deletions scripts/run_cltool.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#!/usr/bin/env bash

args="${@:1}" # All arguments

pushd "$(dirname "$(realpath $0)")" > /dev/null

../cltool/build/cltool ${args}
../cltool/build/cltool "$@"

popd > /dev/null

0 comments on commit beb4065

Please sign in to comment.