mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 11:46:40 +00:00
Add launchd LaunchAgent support
This commit is contained in:
22
install.sh
22
install.sh
@@ -53,6 +53,12 @@ install_virtualenv () {
|
||||
curl -s https://raw.github.com/brainsik/virtualenv-burrito/master/virtualenv-burrito.sh | bash
|
||||
}
|
||||
|
||||
install_launch_agents () {
|
||||
for file in $ROOT_PATH/launch_agents/*.plist; do
|
||||
symlink "$file" "$HOME/Library/LaunchAgents/$(basename "$file")"
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Initial Setup
|
||||
@@ -110,6 +116,9 @@ case "$1" in
|
||||
virtualenv|venv)
|
||||
install_virtualenv
|
||||
;;
|
||||
launch_agents|agents)
|
||||
install_launch_agents
|
||||
;;
|
||||
info)
|
||||
echo "Target directory: $TARGET"
|
||||
echo "Detected dotfiles root: $ROOT_PATH"
|
||||
@@ -118,13 +127,14 @@ case "$1" in
|
||||
echo 'usage: ./install.sh [command]'
|
||||
echo ''
|
||||
echo 'Available commands:'
|
||||
echo ' info: Target and source directory info.'
|
||||
echo ' symlinks: Install symlinks for various dotfiles into' \
|
||||
echo ' info: Target and source directory info.'
|
||||
echo ' symlinks: Install symlinks for various dotfiles into' \
|
||||
'target directory.'
|
||||
echo ' homebrew: Install Homebrew (Mac OS X only).'
|
||||
echo ' rbenv: Install rbenv, a Ruby version manager.'
|
||||
echo ' nvm: Install nvm, a Node.js version manager.'
|
||||
echo ' virtualenv: Install virtualenv-burrito, a Python version and' \
|
||||
echo ' homebrew: Install Homebrew (Mac OS X only).'
|
||||
echo ' rbenv: Install rbenv, a Ruby version manager.'
|
||||
echo ' nvm: Install nvm, a Node.js version manager.'
|
||||
echo ' virtualenv: Install virtualenv-burrito, a Python version and' \
|
||||
'environment manager.'
|
||||
echo ' launch_agents: Install launchd plists to ~/Library/LaunchAgents/'
|
||||
;;
|
||||
esac
|
||||
|
||||
34
launch_agents/me.jimeh.logrotate.plist
Normal file
34
launch_agents/me.jimeh.logrotate.plist
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Disabled</key>
|
||||
<false/>
|
||||
<key>Label</key>
|
||||
<string>me.jimeh.logrotate</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>~/.dotfiles/bin/logrotate-ex</string>
|
||||
</array>
|
||||
<key>EnableGlobbing</key>
|
||||
<true/>
|
||||
<!--
|
||||
<key>StandardOutPath</key>
|
||||
<string>~/Library/Logs/logrotate-ex.log</string>
|
||||
<key>StandardErrorPath</key>
|
||||
<string>~/Library/Logs/logrotate-ex.error.log</string>
|
||||
-->
|
||||
<key>RunAtLoad</key>
|
||||
<false/>
|
||||
<key>EnvironmentVariables</key>
|
||||
<dict>
|
||||
<key>PATH</key>
|
||||
<string>/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin</string>
|
||||
</dict>
|
||||
<key>StartCalendarInterval</key>
|
||||
<dict>
|
||||
<key>Minute</key>
|
||||
<integer>25</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
Reference in New Issue
Block a user