mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-14 16:26:13 +01:00
36 lines
788 B
Plaintext
36 lines
788 B
Plaintext
Generate data for creating test archives
|
|
----------------------------------------
|
|
|
|
echo 'foobar' > /tmp/foo
|
|
|
|
# root perms required for the next command
|
|
echo 'numbers' > /123
|
|
|
|
echo 'qwerty' > very-long-long-long-long-name
|
|
|
|
echo 'asdfgh' > very-long-long-long-long-name2
|
|
|
|
echo 'newline' > 'very-long-name
|
|
-with-newline'
|
|
|
|
echo 'newline' > 'a
|
|
b'
|
|
|
|
mkdir 'dir'
|
|
echo 'file-in-a-dir' > dir/file
|
|
|
|
|
|
Create archive.ar
|
|
-----------------
|
|
|
|
ar qP archive.ar /tmp/foo /123 very-long-long-long-long-name very-long-long-long-long-name2 'very-long-name
|
|
-with-newline' 'a
|
|
b' dir/file
|
|
|
|
|
|
Create archive.cpio
|
|
-------------------
|
|
|
|
printf "/tmp/foo\0/123\0very-long-long-long-long-name\0very-long-long-long-long-name2\0very-long-name
|
|
-with-newline\0a\nb\0dir/file\0" | cpio -ocv0 --owner=root:root > archive.cpio
|