← All repositories

crossmate

A collaborative crossword app for iPhone and iPad

git clone https://code.inqk.net/crossmate.git


commit c10e1fd9bbe85fe934ed35144277394f41809e80
parent 7f29b31e961964c461d10298b8877c8d16b0083f
Author: Michael Camilleri <[email protected]>
Date:   Sat, 13 Jun 2026 15:44:18 +0900

Add support for command-line options to screenshot script

Diffstat

MScripts/screenshots-iphone.sh | 23+++++++++++++++++++----

1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/Scripts/screenshots-iphone.sh b/Scripts/screenshots-iphone.sh

@@ -5,7 +5,17 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
 REPO_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
 source "${SCRIPT_DIR}/select-simulator.sh"
 
-select_simulator "${1:-26}"
+ADD_DYNAMIC_ISLAND=true
+while getopts "n" opt; do
+  case $opt in
+    n) ADD_DYNAMIC_ISLAND=false ;;
+    *) ;;
+  esac
+done
+shift $((OPTIND - 1))
+
+MAJOR="${1:-26}"
+select_simulator "$MAJOR"
 
 echo "Using ${DEVICE}, iOS ${RUNTIME}"
 
@@ -54,7 +64,7 @@ xcrun simctl launch --terminate-running-process "$UDID" "$BUNDLE_ID" \
 
 sleep 3
 
-xcrun simctl io "$UDID" screenshot "$SCREENSHOT_TMP"
+xcrun simctl io "$UDID" screenshot --mask ignored "$SCREENSHOT_TMP"
 xcrun simctl status_bar "$UDID" clear 2>/dev/null || true
 
 if [ ! -f "$SCREENSHOT_TMP" ]; then
@@ -63,8 +73,13 @@ if [ ! -f "$SCREENSHOT_TMP" ]; then
 fi
 
 echo ""
-echo "Adding Dynamic Island..."
-swift "${SCRIPT_DIR}/screenshots-iphone-island.swift" "$SCREENSHOT_TMP" "$OUTPUT_PATH"
+if [ "$ADD_DYNAMIC_ISLAND" = true ]; then
+  echo "Adding Dynamic Island..."
+  swift "${SCRIPT_DIR}/screenshots-iphone-island.swift" "$SCREENSHOT_TMP" "$OUTPUT_PATH"
+else
+  echo "Skipping Dynamic Island..."
+  cp "$SCREENSHOT_TMP" "$OUTPUT_PATH"
+fi
 
 echo ""
 echo "Screenshot saved to ${OUTPUT_PATH}"