-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_shots.sh
More file actions
executable file
·30 lines (27 loc) · 1.05 KB
/
Copy pathbuild_shots.sh
File metadata and controls
executable file
·30 lines (27 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/zsh
# Build MacPulse Shots.app - screenshot organizer menu bar app
set -e
cd "$(dirname "$0")"
APP="MacPulse Shots.app"
rm -rf "$APP"
mkdir -p "$APP/Contents/MacOS"
cat > "$APP/Contents/Info.plist" <<'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key><string>MacPulseShots</string>
<key>CFBundleIdentifier</key><string>local.macpulse.shots</string>
<key>CFBundleName</key><string>MacPulse Shots</string>
<key>CFBundlePackageType</key><string>APPL</string>
<key>CFBundleShortVersionString</key><string>1.0</string>
<key>LSMinimumSystemVersion</key><string>13.0</string>
<key>LSUIElement</key><true/>
<key>NSDesktopFolderUsageDescription</key>
<string>Moves new screenshots from the Desktop into organized folders.</string>
</dict>
</plist>
EOF
swiftc -O -parse-as-library ShotsApp.swift -o "$APP/Contents/MacOS/MacPulseShots"
codesign --force --sign - "$APP"
echo "built: $APP"