some new commands; lfs wip

This commit is contained in:
minjaesong
2023-05-11 20:19:49 +09:00
parent 1efec13ecf
commit 803b86ce43
4 changed files with 49 additions and 3 deletions

View File

@@ -0,0 +1,21 @@
function printUsage() {
println(`Collects files under a directory into a single archive.
Usage: lfs [-c/-x/-t] dest.lfs path\\to\\source
To collect a directory into myarchive.lfs:
lfs -c myarchive.lfs path\\to\\directory
To extract an archive to path\\to\\my\\files:
lfs -x myarchive.lfs \\path\\to\\my\\files
To list the collected files:
lfs -t`)
}
const option = exec_args[1]
const lfsPath = exec_args[2]
const dirPath = exec_args[3]
if (option === undefined || lfsPath === undefined || option.toUpperCase() != "-T" && dirPath === undefined) {
printUsage()
return 0
}