piker/piker.sh

20 lines
643 B
Bash
Executable File

#!/usr/bin/env bash
# macOS wrapper for piker to handle missing XDG_RUNTIME_DIR
# Set up runtime directory for macOS if not already set
if [ -z "$XDG_RUNTIME_DIR" ]; then
# Use macOS standard temp directory with user-specific subdirectory
export XDG_RUNTIME_DIR="/tmp/piker-runtime-$(id -u)"
# Create the directory if it doesn't exist
if [ ! -d "$XDG_RUNTIME_DIR" ]; then
mkdir -p "$XDG_RUNTIME_DIR"
# Set proper permissions (only user can access)
chmod 700 "$XDG_RUNTIME_DIR"
fi
echo "Set XDG_RUNTIME_DIR to: $XDG_RUNTIME_DIR"
fi
# Run piker with all passed arguments
exec uv run piker "$@"