Permalink
Browse files

Makefile: add a missing dir. use symlinks

moni-install: $MAIN option added
  • Loading branch information...
wkpark committed Apr 18, 2009
1 parent d2607fe commit 9e89c2c0b48a73002d3ad164473dfd5542c53540
Showing with 26 additions and 12 deletions.
  1. +2 −2 Makefile
  2. +23 −9 moni-install.in
  3. +1 −1 monisetup.php
View
@@ -6,14 +6,14 @@ install: moni-install
mkdir -p $(DESTDIR)$(prefix)/share/moniwiki/data
cp data/*.* $(DESTDIR)$(prefix)/share/moniwiki/data
cp -ar wikiseed imgs css $(DESTDIR)$(prefix)/share/moniwiki
cp -ar lib plugin $(DESTDIR)$(prefix)/share/moniwiki
cp -ar lib plugin local $(DESTDIR)$(prefix)/share/moniwiki
cp -ar locale tools $(DESTDIR)$(prefix)/share/moniwiki
cp -ar local config $(DESTDIR)$(prefix)/share/moniwiki
cp -ar theme $(DESTDIR)$(prefix)/share/moniwiki
cp -ar applets $(DESTDIR)$(prefix)/share/moniwiki
cp wiki.php wikilib.php $(DESTDIR)$(prefix)/share/moniwiki
cp wikismiley.php $(DESTDIR)$(prefix)/share/moniwiki
cp config.php.default monisetup.php $(DESTDIR)$(prefix)/share/moniwiki
cp config.php.* monisetup.php $(DESTDIR)$(prefix)/share/moniwiki
cp monisetup.sh secure.sh $(DESTDIR)$(prefix)/share/moniwiki
cp moni-install $(DESTDIR)$(prefix)/share/moniwiki/bin
View
@@ -5,18 +5,32 @@ echo "| MoniWiki installation script |"
echo "+------------------------------------+"
echo
INSTDIR=@@INSTDIR@@
if [ -z $INSTDIR ]; then
INSTDIR=@@INSTDIR@@
fi
if [ -z $MAIN ]; then
MAIN=wiki.php
fi
[ ! -d data ] && cp -a $INSTDIR/data .
[ ! -d imgs ] && cp -a $INSTDIR/imgs .
[ ! -d theme ] && cp -a $INSTDIR/theme .
[ ! -d css ] && cp -a $INSTDIR/css .
[ ! -d local ] && cp -a $INSTDIR/local .
[ ! -d config ] && cp -a $INSTDIR/config .
[ ! -d applets ] && cp -a $INSTDIR/applets .
cp $INSTDIR/{monisetup.*,secure.sh,config.php.default} .
[ ! -d imgs ] && ln -s $INSTDIR/imgs .
[ ! -d images ] && ln -s $INSTDIR/imgs .
[ ! -d theme ] && ln -s $INSTDIR/theme .
[ ! -d css ] && ln -s $INSTDIR/css .
[ ! -d local ] && ln -s $INSTDIR/local .
[ ! -d locale ] && ln -s $INSTDIR/locale .
[ ! -d config ] && ln -s $INSTDIR/config .
[ ! -d applets ] && ln -s $INSTDIR/applets .
[ ! -d plugin ] && ln -s $INSTDIR/plugin .
[ ! -f config.php.default ] && ln -s $INSTDIR/config.php.default .
[ ! -f monisetup.php ] && ln -s $INSTDIR/monisetup.php .
conf=`ls $INSTDIR/config.php.*|grep -v config.php.default`
cp -a $INSTDIR/{monisetup.sh,secure.sh} .
cp -a $conf .
cat <<PHP >index.php
<?php
include("$INSTDIR/wiki.php");
include("$INSTDIR/$MAIN");
?>
PHP
View
@@ -90,7 +90,7 @@ function _getHostConfig() {
}
if (!file_exists('wikilib.php')) {
$checkfile = array('index.php','plugin');
$checkfile = array('plugin','locale');
$dir='';
foreach ($checkfile as $f) {
if (is_link($f)) {

0 comments on commit 9e89c2c

Please sign in to comment.