parent
3e6b3d63ca
commit
f8503af47a
@ -0,0 +1,25 @@
|
||||
require 'fileutils'
|
||||
|
||||
include FileUtils
|
||||
|
||||
def with_mount(image)
|
||||
out = `hdiutil mount #{image}`
|
||||
mountpoint = out.split(/\s+/).last
|
||||
yield(mountpoint)
|
||||
ensure
|
||||
puts `hdiutil unmount #{mountpoint}`
|
||||
end
|
||||
|
||||
cd File.expand_path('~/.ssh')
|
||||
|
||||
with_mount "~/Dropbox/sekritz.sparseimage" do |mountpoint|
|
||||
from = Dir["#{mountpoint}/ssh keys/*"]
|
||||
to = from.map {|file| File.basename(file) }
|
||||
from.zip(to).each do |from, to|
|
||||
next if File.exist?(to)
|
||||
|
||||
cp from, to
|
||||
puts `chmod go-r #{to}`
|
||||
puts `ssh-add -K #{to}`
|
||||
end
|
||||
end
|
@ -1 +1,13 @@
|
||||
---
|
||||
- homebrew: name=stow
|
||||
- git: repo=https://github.com/kejadlen/dotfiles.git dest=~/.dotfiles
|
||||
- command: >
|
||||
chdir={{ ansible_env.HOME }}/.dotfiles
|
||||
stow --stow --target={{ ansible_env.HOME }} {{ item }}
|
||||
with_items: stow
|
||||
- file:
|
||||
src: {{ ansible_env.HOME }}/.dotfiles/{{ item.key }}
|
||||
dest: {{ ansible_env.HOME}}/{{ item.value }}
|
||||
state: link
|
||||
with_dict: ln
|
||||
- local_action: command ruby setup_ssh_keys.rb
|
||||
|
@ -0,0 +1,10 @@
|
||||
stow:
|
||||
- config
|
||||
- git
|
||||
- pentadactyl
|
||||
- ruby
|
||||
- ssh
|
||||
- tmux
|
||||
- vim
|
||||
ln:
|
||||
git/.gitignore: .gitignore
|
Loading…
Reference in new issue