Skip to content

Commit

Permalink
deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Deeb-Swihart committed Jan 12, 2019
1 parent c679a04 commit b28f093
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 4 deletions.
2 changes: 2 additions & 0 deletions bin/Darwin/brew-leaves.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
brew leaves > "$HOME/Documents/Projects/dotfiles/extra/brew-leaves"
11 changes: 11 additions & 0 deletions deps/Darwin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Install homebrew
if [ ! -d /usr/local/Cellar ]; then
echo "Installing homebrew"
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi

# Install homebrew packages
if [ -d "$(pwd)/extra/brew-leaves"]; then
echo "Installing homebrew packages"
<"$(pwd)/extra/brew-leaves" xargs brew install
fi
Empty file added deps/Linux.sh
Empty file.
12 changes: 8 additions & 4 deletions freshrc
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,18 @@ for binf in "$SRCD/bin"/*; do
done

## platform-specific setup
if [ -d "${SRCD}/bin/$(uname -s)" ]; then
for binf in "${SRCD}"/bin/$(uname -s)/*; do
un-$(uname -s)
if [ -d "${SRCD}/bin/${un}" ]; then
for binf in "${SRCD}"/bin/${un}/*; do
binf=$(basename "${binf}")
fresh https://gitlab.com/timods/dotfiles "bin/$(uname -s)/${binf}" --bin="$HOME/.local/bin/${binf}"
fresh https://gitlab.com/timods/dotfiles "bin/${un}/${binf}" --bin="$HOME/.local/bin/${binf}"
done
fi

if [[ "$(uname)" == "Darwin" ]]; then
# Install platform-specific deps
test -f "${SRCD}/deps/${un}.sh" && source "${SRCD}/deps/${un}.sh"

if [[ "${un}" == "Darwin" ]]; then
# Grab all my launchagents
for la in "${SRCD}"/launchagents/*.plist; do
la=$(basename "${la}")
Expand Down
21 changes: 21 additions & 0 deletions launchagents/local.timods.b-leaves.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?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>local.timods.b-leaves</string>
<key>ProgramArguments</key>
<array>
<string>bash</string>
<string>brew-leaves.sh</string>
</array>
<key>StartInterval</key>
<integer>21600</integer>
<key>RunAtLoad</key>
<true/>
<key>StandardErrorPath</key>
<string>/Users/timods/Library/Logs/Local/bleaves.stderr.log</string>
<key>StandardOutPath</key>
<string>/Users/timods/Library/Logs/Local/bleaves.stdout.log</string>
</dict>
</plist>

0 comments on commit b28f093

Please sign in to comment.