From 5596a12da813e734ffbce6a8f9a1c160779772b4 Mon Sep 17 00:00:00 2001 From: Gustav Eek Date: Thu, 3 Oct 2019 15:38:16 +0200 Subject: [PATCH] [folkets] Bugfix of language setting Refactor *LANG* -> *LANGUAGE*. Bash variables overwrote environmental variable. Also call "/usr/bin" versions to avoid aliases. --- folkets | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/folkets b/folkets index 9f69e81..f6665c3 100755 --- a/folkets +++ b/folkets @@ -6,7 +6,7 @@ set -e BASE="https://folkets-lexikon.csc.kth.se" LOC="folkets/service" -LANG="both" +LANGUAGE="both" INTERFACE="sv" LOG="/tmp/folkets/error.out" HTML="/tmp/folkets/out.html" @@ -17,13 +17,14 @@ url="$BASE/$LOC" form=" --data-urlencode word=$word - --data-urlencode lang=$LANG + --data-urlencode lang=$LANGUAGE --data-urlencode interface=$INTERFACE " mkdir -p $(dirname $LOG $HTML) -curl -v -L --get ${form} ${url} 2> $LOG | w3m -T text/html +/usr/bin/curl -v -L --get ${form} ${url} 2> $LOG |\ + /usr/bin/w3m -T text/html # Consider make also the call with w3m # Consider put on stdout -- 2.39.5