cmd-compress: move compressor-related logic lower down
Prep for next patch.
@@ -42,16 +42,6 @@ parser.add_argument("--fast", action='store_true',
help="Override compression to `gzip -1`")
args = parser.parse_args()
-# that's the tool default
-gzip_level = 6
-if args.fast:
- args.compressor = 'gzip'
- gzip_level = 1
-
-# find extension for --compressor
-ext_dict = {'xz': '.xz', 'gzip': '.gz'}
-ext = ext_dict[args.compressor]
-
builds = Builds()
# default to latest build if not specified
@@ -62,6 +52,16 @@ else:
print(f"Targeting build: {build}")
+# that's the tool default
+gzip_level = 6
+if args.fast:
+ args.compressor = 'gzip'
+ gzip_level = 1
+
+# find extension for compressor
+ext_dict = {'xz': '.xz', 'gzip': '.gz'}
+ext = ext_dict[args.compressor]
+
def get_cpu_param(param):
with open(f'/sys/fs/cgroup/cpu/cpu.{param}') as f:
