From f1d62c8f83b4860127a5a9e19032df8892c468c8 Mon Sep 17 00:00:00 2001 From: Kuang-che Wu Date: Sat, 6 Dec 2014 14:34:06 +0800 Subject: Make the update script more portable On FreeBSD, "m4" is slightly different to GNU M4, for example, --prefix-builtins is GNU M4 only feature. GNU M4 is an external package at /usr/local/bin/gm4. So make it customable variable. --- sources/master/update.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sources') diff --git a/sources/master/update.sh b/sources/master/update.sh index 12c3ad4..e4ccaba 100755 --- a/sources/master/update.sh +++ b/sources/master/update.sh @@ -9,6 +9,7 @@ set -e DIR=$1 +[ -n "$M4" ] || M4=m4 DATECMD='date +%Y-%m-%dT%H:%M:%S' if [ "x" = "x$DIR" ]; then @@ -25,13 +26,13 @@ SELECTION_DB=$DIR/selection.db echo "`$DATECMD` Create search database..." rm -f $DIR/taginfo-search.db -m4 --prefix-builtins -D __DIR__=$DIR search.sql | sqlite3 $DIR/taginfo-search.db +$M4 --prefix-builtins -D __DIR__=$DIR search.sql | sqlite3 $DIR/taginfo-search.db echo "`$DATECMD` Create master database..." rm -f $MASTER_DB sqlite3 $MASTER_DB