From: mmj Date: Fri, 28 Jan 2005 13:03:55 +0000 (+1100) Subject: mlmmj-make-ml.sh will now know where the listtexts where installed X-Git-Tag: RELEASE_1_2_12_RC1~136 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9e8eda1c59ee47693cb601905ea1b438abcdc54;p=thirdparty%2Fmlmmj.git mlmmj-make-ml.sh will now know where the listtexts where installed in the system, and use that as default. --- diff --git a/ChangeLog b/ChangeLog index 1dfe2939..7b14d3a1 100644 --- 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 diff --git a/configure.ac b/configure.ac index 64c12fcc..726f5e46 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/listtexts/Makefile.am b/listtexts/Makefile.am index 41e07e48..78dd5499 100644 --- a/listtexts/Makefile.am +++ b/listtexts/Makefile.am @@ -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 \ diff --git a/src/mlmmj-make-ml.sh b/src/mlmmj-make-ml.sh.in similarity index 94% rename from src/mlmmj-make-ml.sh rename to src/mlmmj-make-ml.sh.in index 04b5d7c0..26f397a5 100755 --- a/src/mlmmj-make-ml.sh +++ b/src/mlmmj-make-ml.sh.in @@ -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."