jacobobryant / platypub

A publishing platform built with Biff
MIT License
65 stars 13 forks source link

babashka/fs equivalents to existing code where appropriate #75

Closed bhlieberman closed 2 years ago

bhlieberman commented 2 years ago

I left line 305 of util.clj untouched because the bb/fs equivalent appeared to be fs/set-posix-file-permissions, which seemed a tad verbose compared to the existing code.

bhlieberman commented 2 years ago

Also I wasn't sure about how to pass the flags to fs/copy-tree on line 86 of sites.clj

jacobobryant commented 2 years ago

Thanks, this is great! I'll delete that chmod in util.clj at some point anyway so no worries there. For copy-tree, I looked at the source and I see it's a boolean flag. I pushed an update. I also changed (biff/catchall (fs/which "rsync")) to (fs/which "rsync")--the catchall was necessary before because (biff/sh "which" "rsync") throws an exception if rsync isn't on the path, but fs/which just returns nil in that case.