File: test.sh

package info (click to toggle)
clsync 0.4.5-2.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,404 kB
  • sloc: ansic: 15,074; sh: 466; makefile: 269
file content (18 lines) | stat: -rwxr-xr-x 398 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

#mkdir -m 700 -p testdir/from testdir/to testdir/listdir

cat > rules <<EOF
-d^[Dd]ont[Ss]ync\$
+*.*
EOF

rm -rf /mnt/data/from/*
rm -rf /mnt/data/to/*

cp -r /usr /mnt/data/from/usr &
sleep 2; ../clsync -L /shm/clsync --monitor=bsm --exit-on-no-events -x 23 -x 24 -M rsyncdirect -S "$(which rsync)" -W /mnt/data/from -D /mnt/data/to -d99

rm -rf /mnt/data/from/*
rm -rf /mnt/data/to/*