From 8045797badb15e4e4057d0e15ccb1e1c61271407 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Tue, 17 Jan 2023 19:38:04 -0800 Subject: [PATCH] add to option to rake sync:config --- Rakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 229a4b4..4525bc8 100644 --- a/Rakefile +++ b/Rakefile @@ -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