add to option to rake sync:config

main
Alpha Chen 2 years ago
parent 86075aa0e3
commit 8045797bad
Signed by: alpha
SSH Key Fingerprint: SHA256:3fOT8fiYQG/aK9ntivV3Bqtg8AYQ7q4nV6ZgihOA20g

@ -48,9 +48,9 @@ namespace :sync do
end
desc "Sync a config"
task :config, [:config] do |t, args|
task :config, [:config, :to] do |t, args|
config = File.expand_path(args[:config])
to = config.sub(Dir.home, '\0/.dotfiles')
to = args[:to] || config.sub(Dir.home, '\0/.dotfiles')
mv config, to
ln_s to, config

Loading…
Cancel
Save