wip: packaging + scripts before archive into OpenKKnD
This commit is contained in:
parent
820813e24b
commit
769d779571
11 changed files with 177 additions and 7 deletions
33
scripts/install-autobuild-launchd.sh
Executable file
33
scripts/install-autobuild-launchd.sh
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
PLIST="$HOME/Library/LaunchAgents/ch.openkknd.autobuild.plist"
|
||||
mkdir -p "$HOME/Library/LaunchAgents"
|
||||
cat > "$PLIST" << PL
|
||||
<?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>Label</key>
|
||||
<string>ch.openkknd.autobuild</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>$ROOT/scripts/bump-and-build.sh</string>
|
||||
</array>
|
||||
<key>StartInterval</key>
|
||||
<integer>14400</integer>
|
||||
<key>RunAtLoad</key>
|
||||
<false/>
|
||||
<key>StandardOutPath</key>
|
||||
<string>$ROOT/logs/launchd.out.log</string>
|
||||
<key>StandardErrorPath</key>
|
||||
<string>$ROOT/logs/launchd.err.log</string>
|
||||
<key>WorkingDirectory</key>
|
||||
<string>$ROOT</string>
|
||||
</dict>
|
||||
</plist>
|
||||
PL
|
||||
launchctl bootout "gui/$(id -u)/ch.openkknd.autobuild" 2>/dev/null || true
|
||||
launchctl bootstrap "gui/$(id -u)" "$PLIST"
|
||||
launchctl enable "gui/$(id -u)/ch.openkknd.autobuild" 2>/dev/null || true
|
||||
echo "Installed $PLIST (every 14400s = 4h)"
|
||||
Loading…
Add table
Add a link
Reference in a new issue