feat: update iPhone photo inbox scripts with environment file support and refactor batch handling
This commit is contained in:
16
scripts/iphone-photo-inbox/run.sh
Executable file
16
scripts/iphone-photo-inbox/run.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
HELPER_SRC="$SCRIPT_DIR/copy_files_to_clipboard.swift"
|
||||
HELPER_BIN="$SCRIPT_DIR/copy_files_to_clipboard"
|
||||
|
||||
if command -v swiftc >/dev/null 2>&1; then
|
||||
if [[ ! -x "$HELPER_BIN" || "$HELPER_SRC" -nt "$HELPER_BIN" ]]; then
|
||||
swiftc "$HELPER_SRC" -o "$HELPER_BIN"
|
||||
fi
|
||||
else
|
||||
echo "warning: swiftc not found; receiver will run the Swift helper script directly" >&2
|
||||
fi
|
||||
|
||||
exec python3 "$SCRIPT_DIR/receiver.py" "$@"
|
||||
Reference in New Issue
Block a user