#!/bin/sh

set -e

# Execute the command, capture the output and remove empty lines
output=$(samplv1_jack -g -v 2>&1 | grep -v '^$')

# Check the exit status of the command
if [ $? -eq 0 ]; then
    echo "$output"
    echo "The command executed successfully!"
else
    echo "$output"
    echo "The command failed."
    exit 1
fi

# Exit the script
exit 0
