dodan override za lintian
[ossec-hids.git] / src / win32 / gen_win.sh
1 #!/bin/sh
2
3 # Generate windows packages
4 DIR=`dirname $0`;
5 FILE="win-files.txt"
6 CAT=`cat ${FILE}`
7 WINPKG="win-pkg"
8
9 # Generating configs
10 ./unix2dos.pl ossec.conf > ossec-win.conf
11 ./unix2dos.pl help.txt > help_win.txt
12 ./unix2dos.pl ../../etc/internal_options.conf > internal_options-win.conf
13 ./unix2dos.pl ../../etc/local_internal_options-win.conf > local_internal_options-win.conf
14 ./unix2dos.pl ../../LICENSE > LICENSE.txt
15 ./unix2dos.pl ../../active-response/win/route-null.cmd > route-null.cmd
16 ./unix2dos.pl ../../active-response/win/restart-ossec.cmd > restart-ossec.cmd
17
18 # Going to the source dir
19 cd ${DIR}
20 CAT=`cat ${FILE}`
21 cd ..
22 mkdir ${WINPKG}
23 mkdir ${WINPKG}/setup
24
25 source=""
26 dest=""
27 for i in ${CAT}; do
28     echo $i;
29     if [ "X${source}" = "X" ]; then
30         source=$i;
31     elif [ "X${dest}" = "X" ]; then
32         dest=$i;
33         echo "cp -pr ${source} ${WINPKG}/${dest}"
34         cp -pr ${source} "${WINPKG}/${dest}"
35         if [ ! $? = 0 ]; then
36             echo "Error copying ${source} to ${WINPKG}/${dest}"
37             exit 1;
38         fi
39         source=""
40         dest=""
41     fi
42 done
43
44 # Final cleanup, -f will ignore if files do not exist
45 rm -f ${WINPKG}/os_crypto/md5/main.c
46 rm -f ${WINPKG}/os_crypto/blowfish/main.c
47 rm -f ${WINPKG}/os_crypto/sha1/main.c
48 rm -f ${WINPKG}/os_crypto/md5_sha1/main.c
49 rm -f ${WINPKG}/shared/rules_op.c