Skip to content

Commit

Permalink
refactor(rake): work task and rclone
Browse files Browse the repository at this point in the history
  • Loading branch information
olimorris committed Jan 17, 2025
1 parent 9b7ecd1 commit 61735c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .config/rclone/filter_list.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
- Icon␍
- .DS_Store
- node_modules/
- vendor/
Expand All @@ -21,3 +20,4 @@
- .Spotlight-V100/
- .fseventsd/
- .repro/
- .deps/
9 changes: 5 additions & 4 deletions tasks/work.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
}

flag = ' -P' if args[:progress]
filter = ' --filter-from ~/.config/rclone/filter_list.txt'

dirs.each do |local, remote|
run %( /opt/homebrew/bin/rclone copy #{remote}#{flag} ~/#{local} )
run %( /opt/homebrew/bin/rclone copy #{remote}#{flag} ~/#{local}#{filter} )
end
end
end
Expand All @@ -24,15 +25,15 @@

dirs = {
# '.dotfiles' => "#{ENV['STORAGE_FOLDER']}:dotfiles",
'Code' => "#{ENV['STORAGE_ENCRYPTED_FOLDER']}:Code",
'Code' => "#{ENV['STORAGE_ENCRYPTED_FOLDER']}:Code"
}

flag = ' -P' if args[:progress]
filter = ' --filter-from ~/.config/rclone/filter_list.txt'

dirs.each do |local, remote|
run %( /opt/homebrew/bin/rclone copy ~/#{local} #{remote}#{flag} )
run %( /opt/homebrew/bin/rclone copy ~/#{local} #{remote}#{flag}#{filter} )
end
end
end

end

0 comments on commit 61735c8

Please sign in to comment.