aboutsummaryrefslogtreecommitdiff
path: root/steam-export-cli.go
diff options
context:
space:
mode:
Diffstat (limited to 'steam-export-cli.go')
-rw-r--r--steam-export-cli.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/steam-export-cli.go b/steam-export-cli.go
index 3b9d607..23857e0 100644
--- a/steam-export-cli.go
+++ b/steam-export-cli.go
@@ -91,6 +91,8 @@ func packageGame(args []string) error {
"Name of the archive file to be created. Please do not include the file extension")
game := fl.Int("g", -1,
"Index of the game to be exported. Please see `list` for the index")
+ compress := fl.String("z", "gz",
+ "Compression type. Default 'gz' '' is no compression")
var g int
l := steam.DefaultLib
@@ -112,7 +114,12 @@ func packageGame(args []string) error {
fileName = &steamLib.Games[g]
}
- return steamLib.PackageGameToFile(g, *fileName+".tar")
+ switch *compress {
+ case "gz":
+ return steamLib.PackageGameToFile(g, *fileName+".tar.gz", *compress)
+ default:
+ return steamLib.PackageGameToFile(g, *fileName+".tar", *compress)
+ }
}
@@ -122,6 +129,8 @@ func extractGame(args []string) error {
"Path to library in question. All the way to the 'steamapps' folder")
fileName := fl.String("f", "",
"Name of the archive file to be extracted. Please include the file extension")
+ compress := fl.String("z", "gz",
+ "Compression type. Default 'gz' '' is no compression")
l := steam.DefaultLib
fl.Parse(args)
@@ -137,7 +146,7 @@ func extractGame(args []string) error {
return errors.New("No filename provided")
}
- return steamLib.ExtractGameFromFile(*fileName)
+ return steamLib.ExtractGameFromFile(*fileName, *compress)
}