parent
33b68b9dab
commit
a67bfc366c
@ -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
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
|||||||
{}
|
|
@ -1 +0,0 @@
|
|||||||
[{"text":" ","isLine":0,"timestamp":1409430600729000},{"text":"-","isLine":0,"timestamp":1409430600453000},{"text":" ","isLine":0,"timestamp":1409430600019000},{"text":"T","isLine":0,"timestamp":1409430599984000},{"text":"h","isLine":0,"timestamp":1409430599951000},{"text":"e","isLine":0,"timestamp":1409430599917000},{"text":" ","isLine":0,"timestamp":1409430599883000},{"text":"N","isLine":0,"timestamp":1409430599849000},{"text":"e","isLine":0,"timestamp":1409430599815000},{"text":"w","isLine":0,"timestamp":1409430599783000}]
|
|
@ -1 +0,0 @@
|
|||||||
{}
|
|
@ -1 +0,0 @@
|
|||||||
{}
|
|
Loading…
Reference in new issue