[meta] Cleanup

pull/28/head
Alpha Chen 10 years ago
parent 1368fda510
commit 33b68b9dab

@ -1,6 +1,6 @@
--- ---
- homebrew: name=stow - homebrew: name=stow
- git: repo=https://github.com/kejadlen/dotfiles.git dest=~/.dotfiles force=no # - git: repo=https://github.com/kejadlen/dotfiles.git dest=~/.dotfiles force=no
- command: > - command: >
chdir={{ ansible_env.HOME }}/.dotfiles chdir={{ ansible_env.HOME }}/.dotfiles
stow --stow --target={{ ansible_env.HOME }} {{ item }} stow --stow --target={{ ansible_env.HOME }} {{ item }}

@ -1,5 +0,0 @@
- hosts: test
sudo: True
tasks:
- name: apt-get update
apt: update_cache=yes

@ -1,21 +0,0 @@
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|
Dir["#{mountpoint}/ssh keys/*"].each do |file|
cp file, File.basename(file)
puts `chmod go-r #{File.basename(file)}`
puts `ssh-add -K #{File.basename(file)}`
end
end

@ -1,25 +0,0 @@
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
Loading…
Cancel
Save