now --with-i18n-swat works to install some international files
authorMotonobu Takahashi <monyo@samba.org>
Tue, 25 Sep 2001 17:40:12 +0000 (17:40 +0000)
committerMotonobu Takahashi <monyo@samba.org>
Tue, 25 Sep 2001 17:40:12 +0000 (17:40 +0000)
used by SWAT into $swatdir/$ln/{help,images,include}

we have still points which needs to discuss, that is how to archive
and install lots of HTML help files and Using Samba files.

-- monyo
(This used to be commit 9ec2d5e96ebb907e66250772057bf5e2601f8ec9)

source3/Makefile.in
source3/configure.in
source3/script/installswat.sh

index f0236a7d78a20b14fabc9b58f71ce55b88e2f1e6..510faac95db1fb8d4307d6aaedc8752e9dc0d52c 100644 (file)
@@ -677,7 +677,8 @@ installscripts: installdirs
        @$(SHELL) $(srcdir)/script/installscripts.sh $(INSTALLPERMS) $(BINDIR) $(SCRIPTS)
 
 installswat: installdirs
-       @$(SHELL) $(srcdir)/script/installswat.sh $(SWATDIR) $(srcdir)
+       @$(SHELL) $(srcdir)/script/installswat.sh $(SWATDIR) $(srcdir) \
+       @i18n_swat@
 
 installclientlib:
        -$(INSTALLCMD) bin/libsmbclient.so $(LIBDIR)
index 41d93e364569b11b573ef8103a2cfbfa9143bc92..8fb238e8fa8fb8f066c2a8aa9d454349da4f9f7b 100644 (file)
@@ -2040,12 +2040,17 @@ AC_ARG_WITH(i18n-swat,
   yes)
     AC_MSG_RESULT(yes)
     AC_DEFINE(I18N_SWAT)
+    i18n_swat="yes"
     ;;
   *)
     AC_MSG_RESULT(no)
+    i18n_swat="no"
     ;;
-  esac ],
-  AC_MSG_RESULT(no)
+  esac 
+  AC_SUBST(i18n_swat) ],
+  [ AC_MSG_RESULT(no)
+  i18n_swat="no"
+  AC_SUBST(i18n_swat) ]
 )
 
 #################################################
index 8868d4cbb1f80894567f97983afe204a420696e4..fce4406b8329407960cbd54541e7a4b7e6c25cce 100755 (executable)
@@ -4,13 +4,26 @@
 SWATDIR=$1
 SRCDIR=$2/
 BOOKDIR=$SWATDIR/using_samba
+IS_I18N=$3
 
 echo Installing SWAT in $SWATDIR
 echo Installing the Samba Web Administration Tool
 
-for d in $SWATDIR $SWATDIR/help $SWATDIR/images $SWATDIR/include; do
+if [ X$IS_I18N = Xyes ]; then
+    LANGS=". `cd $SRCDIR../swat/; /bin/echo lang/??`"
+    echo Installing langs are `cd $SRCDIR../swat/lang/; /bin/echo ??`
+else
+    LANGS=.
+fi
+
+for ln in $LANGS; do 
+
+SWATLANGDIR=$SWATDIR/$ln
+
+for d in $SWATLANGDIR $SWATLANGDIR/help $SWATLANGDIR/images \
+       $SWATLANGDIR/include; do
     if [ ! -d $d ]; then
-       mkdir $d
+       mkdir -p $d
        if [ ! -d $d ]; then
            echo Failed to make directory $d, does $USER have privileges?
            exit 1
@@ -18,10 +31,13 @@ for d in $SWATDIR $SWATDIR/help $SWATDIR/images $SWATDIR/include; do
     fi
 done
 
+done
+
 # Install images
+for ln in $LANGS; do
 
-for f in $SRCDIR../swat/images/*.gif; do
-      FNAME=$SWATDIR/images/`basename $f`
+for f in $SRCDIR../swat/$ln/images/*.gif; do
+      FNAME=$SWATDIR/$ln/images/`basename $f`
       echo $FNAME
       cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges?
       chmod 0644 $FNAME
@@ -29,8 +45,8 @@ done
 
 # Install html help
 
-for f in $SRCDIR../swat/help/*.html; do
-      FNAME=$SWATDIR/help/`basename $f`
+for f in $SRCDIR../swat/$ln/help/*.html; do
+      FNAME=$SWATDIR/$ln/help/`basename $f`
       echo $FNAME
       if [ "x$BOOKDIR" = "x" ]; then
         cat $f | sed 's/@BOOKDIR@.*$//' > $f.tmp
@@ -54,13 +70,15 @@ done
 
 # Install "server-side" includes
 
-for f in $SRCDIR../swat/include/*.html; do
-      FNAME=$SWATDIR/include/`basename $f`
+for f in $SRCDIR../swat/$ln/include/*.html; do
+      FNAME=$SWATDIR/$ln/include/`basename $f`
       echo $FNAME
       cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges?
       chmod 0644 $FNAME
 done
 
+done
+
 # Install Using Samba book
 
 if [ "x$BOOKDIR" != "x" ]; then