Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
lancerts committed Jan 23, 2024
1 parent 767c12d commit 89678e8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions run_cpp_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function start() {
echo "Running example: $EXAMPLE"
}

function error_run() {
function check_run_success() {
if [ $? -eq 0 ]; then
echo "Successfully ran $1"
else
Expand All @@ -61,7 +61,7 @@ function autograd() {
if [ $? -eq 0 ]; then
echo "Successfully built $EXAMPLE"
./$EXAMPLE # Run the executable
error_run "autograd"
check_run_success "autograd"
else
error "Failed to build $EXAMPLE"
exit 1
Expand All @@ -88,7 +88,7 @@ function custom-dataset() {
echo "Successfully built $EXAMPLE"
cd $BASE_DIR/cpp/$EXAMPLE
./build/$EXAMPLE # Run the executable
error_run "custom-dataset"
check_run_success "custom-dataset"
else
error "Failed to build $EXAMPLE"
exit 1
Expand All @@ -104,7 +104,7 @@ function mnist() {
if [ $? -eq 0 ]; then
echo "Successfully built $EXAMPLE"
./$EXAMPLE # Run the executable
error_run "mnist"
check_run_success "mnist"
else
error "Failed to build $EXAMPLE"
exit 1
Expand All @@ -120,7 +120,7 @@ function regression() {
if [ $? -eq 0 ]; then
echo "Successfully built $EXAMPLE"
./$EXAMPLE # Run the executable
error_run "regression"
check_run_success "regression"
else
error "Failed to build $EXAMPLE"
exit 1
Expand Down

0 comments on commit 89678e8

Please sign in to comment.