aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/vdb_merger_TEST_setup.sh
blob: 1cd9693de14fc0072895c5b1415b5935a0c849d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
# vim: set ft=sh sw=4 sts=4 et :

mkdir vdb_merger_TEST_dir || exit 2
cd vdb_merger_TEST_dir || exit 3


mkdir -p config_protect_dir/{image,root,CONTENTS} || exit 4

cd config_protect_dir/image

echo foo >protected_file
echo foo >unprotected_file
echo foo >protected_file_not_really

mkdir protected_dir
echo foo >protected_dir/protected_file
echo foo >protected_dir/unprotected_file
echo foo >protected_dir/unprotected_file_not_really

echo foo >protected_dir/protected_file_already_needs_update
echo foo >protected_dir/unchanged_protected_file
echo foo >protected_dir/protected_file_same_as_existing_update

mkdir protected_dir/unprotected_dir
echo foo >protected_dir/unprotected_dir/unprotected_file

mkdir protected_dir/unprotected_dir_not_really
echo foo >protected_dir/unprotected_dir_not_really/protected_file

mkdir protected_dir_not_really
echo foo >protected_dir_not_really/unprotected_file

cd ../root

echo bar >protected_file
echo bar >unprotected_file
echo bar >protected_file_not_really

mkdir protected_dir
echo bar >protected_dir/protected_file
echo bar >protected_dir/unprotected_file
echo bar >protected_dir/unprotected_file_not_really

echo bar >protected_dir/protected_file_already_needs_update
echo baz >protected_dir/._cfg0000_protected_file_already_needs_update
echo foo >protected_dir/unchanged_protected_file
echo bar >protected_dir/protected_file_same_as_existing_update
echo foo >protected_dir/._cfg0000_protected_file_same_as_existing_update

mkdir protected_dir/unprotected_dir
echo bar >protected_dir/unprotected_dir/unprotected_file

mkdir protected_dir/unprotected_dir_not_really
echo bar >protected_dir/unprotected_dir_not_really/protected_file

mkdir protected_dir_not_really
echo bar >protected_dir_not_really/unprotected_file

cd ../..


for d in *_dir; do
    ln -s ${d} ${d%_dir}
done