GarminWatchfaces/nix-run-simulator.sh

16 lines
430 B
Bash
Raw Permalink Normal View History

2024-11-15 14:02:03 +01:00
#!/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