forked from cvmfs/cvmfs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestsync
executable file
·74 lines (63 loc) · 1.9 KB
/
testsync
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
67
68
69
70
71
72
73
74
#!/bin/sh
# Here I create a test case repository content to sync into a repository
# The created stuff down there basically tests all features of CVMFS's
# synching capabilities in order to have a more or less realistic test case.
#
# This script only works if remount.sh has sucessfully run before
# I guess I do not have to clearify what is going on down there
cd /cvmfs/test.cern.ch
echo "--> creating some files"
echo "file one" > file1
echo "file two" > file2
echo "file three" > file3
echo "--> creating some directories"
mkdir directory
mkdir directory/anotherdirectory
mkdir myDir
mkdir myDir/dir_1
mkdir myDir/dir_2
mkdir myDir/dir_1/foo
echo "--> creating some nested catalog directories"
mkdir nc1
mkdir nc2
mkdir nc3
mkdir nc4
echo "--> populate nested catalogs"
touch nc1/fileNc1
touch nc2/fileNc2
touch nc3/fileNc3
touch nc4/fileNc4
mkdir nc1/dirNc1
mkdir nc2/dirNc2
mkdir nc3/dirNc3
mkdir nc4/dirNc4
touch nc1/dirNc1/fileNc1Dir
touch nc2/dirNc2/fileNc2Dir
touch nc3/dirNc3/fileNc3Dir
touch nc4/dirNc4/fileNc4Dir
echo "--> creating some more files"
echo "content" > directory/nestedFile
echo "foo" > directory/anotherdirectory/file
echo "bar" > myDir/dir_2/foo
echo "--> creating some symlinks"
ln -s file2 symlinkToFile2
ln -s myDir/dir_2/foo symlinkToANestedFile
ln -s file2 myDir/dir_1/symlinkToParentDirectory
echo "--> copying some binary files"
cp /usr/bin/g++ g++
cp /usr/bin/getopt directory/getopt
cp /usr/bin/diff myDir/diff
echo "--> creating some hardlinks"
ln file1 hardlinkToFile1
ln file1 anotherHardlinkToFile1
ln directory/nestedFile directory/hardlinkToNestedFile
ln g++ gPlusPlus
ln symlinkToFile2 hardlinkToSymlinkToFile2
ln nc1/fileNc1 nc1/hardlinkToFileNc1
echo "--> creating cvmfs catalog request files" # to test nested catalog creation
touch directory/.cvmfscatalog
touch nc1/.cvmfscatalog
touch nc1/dirNc1/.cvmfscatalog
touch nc2/.cvmfscatalog
touch nc3/.cvmfscatalog
touch nc4/.cvmfscatalog