Merge branch 'master' of mathias-kettner.de:omd
[omd.git] / packages / omd / .f12
bloba9d8aee144e98985b1104b5de5a8c83fbc5bac43
1 #!/bin/bash
2 # Little install helper used during development and test
3 sudo cp -v index.py /omd/versions/default/share/omd/htdocs/index.py
4 sudo cp -v logout.php /omd/versions/default/share/omd/htdocs/logout.php
5 sudo cp -v img/* /omd/versions/default/share/omd/htdocs/img/
6 sudo rm -vf /omd/versions/default/share/man/man8/omd.8.gz
7 sudo cp -v omd.8 /omd/versions/default/share/man/man8/omd.8
8 sudo gzip /omd/versions/default/share/man/man8/omd.8
9 for hook in *.hook; do
10 sudo cp -v $hook /omd/versions/default/lib/omd/hooks/${hook%*.hook}
11 sudo chmod +x /omd/versions/default/lib/omd/hooks/${hook%*.hook}
12 done
13 sudo mkdir -p /omd/versions/default/lib/omd/scripts/post-create
15 OLD_VERSION=$(sed -rn < /omd/versions/default/bin/omd 's/^OMD_VERSION = "(.*)"$/\1/p')
16 echo $OLD_VERSION
19 echo "Keeping version number in /usr/bin/omd at $OLD_VERSION"
20 sudo cp -v omd /omd/versions/default/bin/omd
21 sudo sed -i "s|###OMD_VERSION###|$OLD_VERSION|g" /omd/versions/default/bin/omd
22 sudo sed -i "s/OMD_VERSION =.*/OMD_VERSION = "'"'"$OLD_VERSION"'"/' /omd/versions/default/bin/omd