summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonnie Berkholz <dberkholz@gentoo.org>2005-12-04 22:36:23 +0000
committerDonnie Berkholz <dberkholz@gentoo.org>2005-12-04 22:36:23 +0000
commiteda6eff209cfdde59b87b9f9c9e8e46324c1c4fa (patch)
tree210f57213e6a125605d434880b8c8ed14699e6c1 /sci-chemistry/webmo/files
parentBump for 7.0RC3. (diff)
downloadhistorical-eda6eff209cfdde59b87b9f9c9e8e46324c1c4fa.tar.gz
historical-eda6eff209cfdde59b87b9f9c9e8e46324c1c4fa.tar.bz2
historical-eda6eff209cfdde59b87b9f9c9e8e46324c1c4fa.zip
Add hook script, to be run when installing to live host.
Package-Manager: portage-2.0.53
Diffstat (limited to 'sci-chemistry/webmo/files')
-rw-r--r--sci-chemistry/webmo/files/reconfig34
1 files changed, 34 insertions, 0 deletions
diff --git a/sci-chemistry/webmo/files/reconfig b/sci-chemistry/webmo/files/reconfig
new file mode 100644
index 000000000000..29287760cdb2
--- /dev/null
+++ b/sci-chemistry/webmo/files/reconfig
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+if [ $1 = "install" ]; then
+ FILE="${MY_CGIBINDIR}/webmo/interfaces/globals.int"
+
+ sed -i \
+ -e "s:htmlBase.*:htmlBase=\"${MY_HTDOCSDIR}\":g" \
+ -e "s:cgiBase.*:cgiBase=\"${MY_CGIBINDIR}/webmo\" :g" \
+ -e "s:userBase.*:userBase=\"${MY_HOSTROOTDIR}/webmo\":g" \
+ ${FILE}
+
+ # If a program is enabled, install .int.disabled changes to .int
+ pushd ${MY_CGIBINDIR}/webmo/interfaces
+ for file in ._cfg*; do
+ realfile=${file#._cfg*_}
+ enabled_file=${realfile%.disabled}
+ if [[ -e ${enabled_file} ]]; then
+ enabled_cfgfile=${enabled_file%.disabled}
+ mv ${file} ${enabled_cfgfile}
+ fi
+ done
+ popd
+else
+ echo "done."
+fi
+
+if [ $1 = "clean" ]; then
+ echo "Please examine the contents of the following directories"
+ echo "and delete anything that is no longer necessary"
+ echo
+ echo ${MY_HTDOCSDIR}
+ echo ${MY_CGIBINDIR}/webmo
+ echo ${MY_HOSTROOTDIR}/webmo
+fi