~dricottone/my-utils

ref: 14ef5bd55713cad3b014ccf6b1b34fea841b513e my-utils/tests/init.sh -rwxr-xr-x 894 bytes
14ef5bd5Dominic Ricottone Updating my docker tools now that I use swarm 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

mkdir tests/static

# compression target
printf "[1]\n[2]\n[3]\n\n" > tests/static/compression_target.txt

# debom target
printf "\xEF\xBB\xBFfoo bar\n" > tests/static/debom_target.txt

# rebom target
printf "foo bar\n" > tests/static/rebom_target.txt

# decompression targets
printf "(a)\n(b)\n(c)\n\n" > tests/static/decompression_result.txt
tar -C tests/static -cf tests/static/decompression_target.tar decompression_result.txt
tar -C tests/static -czf tests/static/decompression_target.tar.gz decompression_result.txt
tar -C tests/static -cJf tests/static/decompression_target.tar.xz decompression_result.txt
tar -C tests/static --zstd -cf tests/static/decompression_target.tar.zst decompression_result.txt
tar -C tests/static -cjf tests/static/decompression_target.tar.bz2 decompression_result.txt
mv tests/static/decompression_result.txt tests/static/decompression_target.txt