]> git.sur5r.net Git - bacula/bacula/blob - regress/scripts/do_sed
f72c8a086cf6fe551ef34a06ba0604c31d5279c9
[bacula/bacula] / regress / scripts / do_sed
1 #!/bin/sh
2 #
3 cwd=`pwd`
4 . ${cwd}/config
5 mkdir -p ${cwd}/bin
6 out="${cwd}/tmp/sed_tmp"
7
8 scripts/create_sed
9
10 # process .in files with sed script
11 sed -f ${out} ${cwd}/scripts/bacula-dir.conf.errors.in >${cwd}/scripts/bacula-dir.conf.errors
12 sed -f ${out} ${cwd}/scripts/bacula-dir.conf.accurate.in >${cwd}/scripts/bacula-dir.conf.accurate
13 sed -f ${out} ${cwd}/scripts/test-bacula-dir.conf.in >${cwd}/scripts/test-bacula-dir.conf
14 sed -f ${out} ${cwd}/scripts/multi-client-bacula-dir.conf.in >${cwd}/scripts/multi-client-bacula-dir.conf
15 sed -f ${out} ${cwd}/scripts/bacula-dir.conf.regexwhere.in >${cwd}/scripts/bacula-dir.conf.regexwhere
16 sed -f ${out} ${cwd}/scripts/bacula-dir.conf.maxtime.in >${cwd}/scripts/bacula-dir.conf.maxtime
17 sed -f ${out} ${cwd}/scripts/new-test-bacula-dir.conf.in >${cwd}/scripts/new-test-bacula-dir.conf
18 sed -f ${out} ${cwd}/scripts/testa-bacula-dir.conf.in >${cwd}/scripts/testa-bacula-dir.conf
19 sed -f ${out} ${cwd}/scripts/testb-bacula-dir.conf.in >${cwd}/scripts/testb-bacula-dir.conf
20 sed -f ${out} ${cwd}/scripts/test-bacula-fd.conf.in >${cwd}/scripts/test-bacula-fd.conf
21 sed -f ${out} ${cwd}/scripts/test-bacula-sd.conf.in >${cwd}/scripts/test-bacula-sd.conf
22 sed -f ${out} ${cwd}/scripts/test-console.conf.in >${cwd}/scripts/test-console.conf
23 sed -f ${out} ${cwd}/scripts/crypto-bacula-fd.conf.in >${cwd}/scripts/crypto-bacula-fd.conf
24 sed -f ${out} ${cwd}/scripts/bacula-dir-tape.conf.in >${cwd}/scripts/bacula-dir-tape.conf
25 sed -f ${out} ${cwd}/scripts/bacula-dir-fifo.conf.in >${cwd}/scripts/bacula-dir-fifo.conf
26 sed -f ${out} ${cwd}/scripts/bacula-dir-strip.conf.in >${cwd}/scripts/bacula-dir-strip.conf
27 sed -f ${out} ${cwd}/scripts/bacula-dir-migration.conf.in >${cwd}/scripts/bacula-dir-migration.conf
28 sed -f ${out} ${cwd}/scripts/win32-bacula-dir-tape.conf.in >${cwd}/scripts/win32-bacula-dir-tape.conf
29 sed -f ${out} ${cwd}/scripts/win32-bacula-dir.conf.in >${cwd}/scripts/win32-bacula-dir.conf
30 sed -f ${out} ${cwd}/scripts/bacula-sd-tape.conf.in >${cwd}/scripts/bacula-sd-tape.conf
31 sed -f ${out} ${cwd}/scripts/ansi-sd-tape.conf.in >${cwd}/scripts/ansi-sd-tape.conf
32 sed -f ${out} ${cwd}/scripts/bacula-sd-fifo.conf.in >${cwd}/scripts/bacula-sd-fifo.conf
33 sed -f ${out} ${cwd}/scripts/bacula-sd-2tape.conf.in >${cwd}/scripts/bacula-sd-2tape.conf
34 sed -f ${out} ${cwd}/scripts/bacula-sd-migration.conf.in >${cwd}/scripts/bacula-sd-migration.conf
35 sed -f ${out} ${cwd}/scripts/bacula-sd-2disk.conf.in >${cwd}/scripts/bacula-sd-2disk.conf
36 sed -f ${out} ${cwd}/scripts/bacula-sd-2drive.conf.in >${cwd}/scripts/bacula-sd-2drive.conf
37 sed -f ${out} ${cwd}/scripts/bacula-sd-2disk-drive.conf.in >${cwd}/scripts/bacula-sd-2disk-drive.conf
38 sed -f ${out} ${cwd}/scripts/cleanup-tape.in >${cwd}/scripts/cleanup-tape
39 sed -f ${out} ${cwd}/scripts/cleanup-2tape.in >${cwd}/scripts/cleanup-2tape
40 sed -f ${out} ${cwd}/scripts/cleanup-2drive.in >${cwd}/scripts/cleanup-2drive
41 sed -f ${out} ${cwd}/scripts/prepare-two-tapes.in >${cwd}/scripts/prepare-two-tapes
42 sed -f ${out} ${cwd}/scripts/bacula-dir.conf.testrunscript.in >${cwd}/scripts/bacula-dir.conf.testrunscript
43 sed -f ${out} ${cwd}/scripts/bacula-dir-faketape.conf.in >${cwd}/scripts/bacula-dir-faketape.conf
44 sed -f ${out} ${cwd}/scripts/bacula-sd-faketape.conf.in >${cwd}/scripts/bacula-sd-faketape.conf
45 sed -f ${out} ${cwd}/scripts/prepare-fake-autochanger.in >${cwd}/scripts/prepare-fake-autochanger
46 sed -f ${out} ${cwd}/scripts/tls-bacula-fd.conf.in >${cwd}/scripts/tls-bacula-fd.conf
47 sed -f ${out} ${cwd}/scripts/tls-bacula-sd.conf.in >${cwd}/scripts/tls-bacula-sd.conf
48 sed -f ${out} ${cwd}/scripts/tls-bacula-dir.conf.in >${cwd}/scripts/tls-bacula-dir.conf
49
50 sed -f ${out} ${cwd}/scripts/tls-auth-bacula-fd.conf.in >${cwd}/scripts/tls-auth-bacula-fd.conf
51 sed -f ${out} ${cwd}/scripts/tls-auth-bacula-sd.conf.in >${cwd}/scripts/tls-auth-bacula-sd.conf
52 sed -f ${out} ${cwd}/scripts/tls-auth-bacula-dir.conf.in >${cwd}/scripts/tls-auth-bacula-dir.conf
53
54
55 sed -f ${out} ${cwd}/scripts/bacula-fd-2d.conf.in >${cwd}/scripts/bacula-fd-2d.conf
56 sed -f ${out} ${cwd}/scripts/bacula-sd-2d.conf.in >${cwd}/scripts/bacula-sd-2d.conf
57 sed -f ${out} ${cwd}/scripts/bacula-dir-2d.conf.in >${cwd}/scripts/bacula-dir-2d.conf
58 sed -f ${out} ${cwd}/scripts/bconsole-2d.conf.in >${cwd}/scripts/bconsole-2d.conf
59
60 scripts/config_dart
61
62 # These files have no fancy sed stuff, so we just copy them over
63 cp scripts/win32-bacula-sd-tape.conf.in scripts/win32-bacula-sd-tape.conf
64 cp scripts/win32-bacula-fd.conf.in      scripts/win32-bacula-fd.conf
65
66 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/bac$$
67 sed s%/tmp%${cwd}/tmp%g ${cwd}/tmp/bac$$ >${cwd}/bin/bacula-sd.conf
68 chmod 755 ${cwd}/scripts/cleanup-*tape ${cwd}/scripts/cleanup-*drive ${cwd}/scripts/prepare-two-tapes 
69 rm -f ${cwd}/tmp/bac$$
70 cp ${cwd}/bin/mtx-changer ${cwd}/tmp/bac$$
71 sed "s%^MTX.*$%MTX=${AUTOCHANGER_PATH}%g" ${cwd}/tmp/bac$$ >${cwd}/bin/mtx-changer
72 chmod 755 ${cwd}/bin/mtx-changer ${cwd}/scripts/prepare-big-autochanger
73
74 # get proper SD tape definitions
75 cp -f ${cwd}/scripts/linux_tape_options ${cwd}/bin/tape_options
76 if test x`uname` = xFreeBSD ; then
77    cp -f ${cwd}/scripts/freebsd_tape_options ${cwd}/bin/tape_options
78 fi
79
80 rm -f ${out}
81 rm -f ${cwd}/tmp/bac$$