@@ -13,6 +13,7 @@ Commands:
1313 # No priviledge required
1414 get [ARGS] Download linked files missing on the local cache and decompress
1515 get! [ARGS] Download all linked files and decompress
16+ get- [ARGS] Download linked files missing to the local cache, but do no compress
1617 pack Compress non-compressed build files into the local cache
1718 pack! Compress build files into the local cache (no skipping)
1819 unpack Decompress linked already downloaded files
@@ -50,18 +51,20 @@ def toPaths (args : List String) : List FilePath :=
5051 args.map (FilePath.mk · |>.normalize)
5152
5253def curlArgs : List String :=
53- ["get" , "get!" , "put" , "put!" , "commit" , "commit!" ]
54+ ["get" , "get!" , "get-" , " put" , "put!" , "commit" , "commit!" ]
5455
5556open Cache IO Hashing Requests in
5657def main (args : List String) : IO Unit := do
5758 let hashMemo ← getHashMemo
5859 let hashMap := hashMemo.hashMap
5960 let goodCurl := !(curlArgs.contains (args.headD "" ) && !(← validateCurl))
6061 match args with
61- | ["get" ] => getFiles hashMap false goodCurl
62- | ["get!" ] => getFiles hashMap true goodCurl
63- | "get" :: args => getFiles (← hashMemo.filterByFilePaths (toPaths args)) false goodCurl
64- | "get!" :: args => getFiles (← hashMemo.filterByFilePaths (toPaths args)) true goodCurl
62+ | ["get" ] => getFiles hashMap false goodCurl true
63+ | ["get!" ] => getFiles hashMap true goodCurl true
64+ | ["get-" ] => getFiles hashMap false goodCurl false
65+ | "get" :: args => getFiles (← hashMemo.filterByFilePaths (toPaths args)) false goodCurl true
66+ | "get!" :: args => getFiles (← hashMemo.filterByFilePaths (toPaths args)) true goodCurl true
67+ | "get-" :: args => getFiles (← hashMemo.filterByFilePaths (toPaths args)) false goodCurl false
6568 | ["pack" ] => discard $ packCache hashMap false
6669 | ["pack!" ] => discard $ packCache hashMap true
6770 | ["unpack" ] => unpackCache hashMap
0 commit comments