]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
mlmmj-make-ml.sh will now know where the listtexts where installed
authormmj <none@none>
Fri, 28 Jan 2005 13:03:55 +0000 (00:03 +1100)
committermmj <none@none>
Fri, 28 Jan 2005 13:03:55 +0000 (00:03 +1100)
in the system, and use that as default.

ChangeLog
configure.ac
listtexts/Makefile.am
src/mlmmj-make-ml.sh.in [moved from src/mlmmj-make-ml.sh with 94% similarity]

index 1dfe293989c303e6ddb40c1bd1f16222f2c93a3c..7b14d3a102ded93a1e54da408c11e6662aa69026 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,5 @@
+ o Make mlmmj-make-ml.sh default the listtext dir to where they were
+   installed in the system (Stephan Kulow)
 1.2.1
  o Introduce switches to turn off mails about posts being denied.
 1.2.0
index 64c12fcce610b7428a7c0dbae4e9f2ed4ddb2cc7..726f5e46bba517c63cc7568360ebc723a7dc4e4c 100644 (file)
@@ -24,6 +24,14 @@ AC_CHECK_HEADERS([sys/socket.h syslog.h unistd.h time.h])
 AC_C_CONST
 AC_TYPE_SIZE_T
 
+savex=$exec_prefix
+test "x$exec_prefix" = xNONE && exec_prefix=$prefix
+tmp=$datadir/$PACKAGE/text.skel
+while textlibdir=`eval echo "$tmp"`; test "x$textlibdir" != "x$tmp"; do tmp=$textlibdir; done
+exec_prefix=$savex
+
+AC_SUBST(textlibdir)
+
 # Checks for library functions.
 AC_FUNC_MALLOC
 AC_CHECK_FUNCS([ftruncate memset socket strerror strncasecmp snprintf fcntl])
@@ -31,5 +39,6 @@ AC_CHECK_FUNCS([nanosleep time strftime syslog regcomp regexec])
 
 AC_CONFIG_FILES([Makefile])
 AC_CONFIG_FILES([src/Makefile])
+AC_CONFIG_FILES([src/mlmmj-make-ml.sh])
 AC_CONFIG_FILES([listtexts/Makefile])
 AC_OUTPUT
index 41e07e48e09bde55bb91d2d66662f5419bdd58ea..78dd54994ed0f53b3699c143d7be672d21028518 100644 (file)
@@ -1,6 +1,5 @@
 ## Process this file with automake to produce Makefile.in
 
-textlibdir = $(pkgdatadir)/text.skel
 dist_textlib_DATA = access bounce-probe listhelp moderation notifysub \
        notifysub-digest notifysub-nomail notifyunsub notifyunsub-digest \
        notifyunsub-nomail notintocc sub-confirm sub-confirm-digest \
similarity index 94%
rename from src/mlmmj-make-ml.sh
rename to src/mlmmj-make-ml.sh.in
index 04b5d7c011413dbb7c9cfeb5f4002ccc0fa7a87a..26f397a59fadd43a13deb16a6bea8f6665567ea2 100755 (executable)
@@ -88,9 +88,11 @@ if [ -z "$OWNER" ]; then
 fi
 echo "$OWNER" > "$LISTDIR"/"control/owner"
 
-echo -n "The path to texts for the list? (listtexts/ dir in the src) [] : "
-read TEXTPATH
-if [ -z "$TEXTPATH" -o ! -d "$TEXTPATH" ]; then
+TEXTPATH=@textlibdir@
+echo -n "The path to texts for the list? [$TEXTPATH] : "
+read TEXTPATHIN
+test TEXTPATHIN && TEXTPATH=$TEXTPATHIN
+if [ -z "$TEXTPATHIN" -o ! -d "$TEXTPATH" ]; then
        echo "**NOTE** Could not copy the texts for the list"
        echo "Please manually copy the files from the listtexts/ directory"
        echo "in the source distribution of mlmmj."