We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 28769f9 commit 7b4454cCopy full SHA for 7b4454c
juniper-cdn-download
@@ -15,7 +15,7 @@ echo "Extracted filename: $output_filename"
15
16
17
# Check if the URL contains ".qcow2"
18
-if [[ "$url" == *".qcow2"* ]]; then
+if [[ "$url" == *".qcow2?"* ]]; then
19
output_filename="virtioa.qcow2"
20
fi
21
@@ -24,7 +24,16 @@ if [ $# -ge 2 ]; then
24
output_filename="$2"
25
26
27
-
28
29
# Run aria2c to download the URL
30
aria2c -x 16 -k 100M -s 16 "$url" --out "$output_filename"
+
+# Check if the output_filename has a .gz extension
31
+if [[ $output_filename == *.gz ]]; then
32
+ echo "File is gzip-compressed"
33
34
+ # Decompress the file using gzip
35
+ gzip -d "$output_filename"
36
+ echo "Decompression complete"
37
+else
38
+ echo "File is not gzip-compressed"
39
+fi
0 commit comments