From f916a94c64016b707720165bd24b0412f585aa0d Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Fri, 20 Dec 2024 08:43:30 +0000 Subject: [PATCH] Add a project_dir argument --- src/upload.raku | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/upload.raku b/src/upload.raku index 83503bb..e95959d 100755 --- a/src/upload.raku +++ b/src/upload.raku @@ -50,7 +50,13 @@ sub render-idris-file($idr) { $out-file.spurt: $contents; } -sub MAIN() { +sub MAIN( + $project_dir? #= Base directory of project to upload, defaults to %*CWD +) { + if $project_dir ~~ Str { + $*CWD = $project_dir.IO.resolve; + }; + # Find and collect all of our idris files my @idris-files = paths("src", :file(-> $a {$a.ends-with(".idr") || $a.ends-with(".md")}))