#!/usr/bin/env bash CURRENT_SDK="$HOME/.Garmin/ConnectIQ/current-sdk.cfg" if [[ -f "$CURRENT_SDK" ]]; then FOLDER_PATH=$(<"$CURRENT_SDK") if [[ -d "$FOLDER_PATH" ]]; then nix-shell --run "$FOLDER_PATH/bin/simulator" else echo "Error: The folder specified in $CURRENT_SDK does not exist." exit 1 fi else echo "Error: no currect Garmin Connect IQ SDK in $CURRENT_SDK." exit 1 fi