Commit df82d93e authored by David Byers's avatar David Byers
Browse files

Fix syntax errors on a *real* sh

Detect brain-dead version of sed so we abort rather than create buggy pages
parent 2e1ffc2c
...@@ -10,7 +10,7 @@ lang_inverse="\([^<]\|<[^/]\|</[^l]\|</l[^a]\|</la[^n]\|</lan[^g]\|</lang[^>]\)* ...@@ -10,7 +10,7 @@ lang_inverse="\([^<]\|<[^/]\|</[^l]\|</l[^a]\|</la[^n]\|</lan[^g]\|</lang[^>]\)*
# Make a swedish version without content # Make a swedish version without content
function extract_language () { extract_language() {
lang="$1" lang="$1"
inverse="$2" inverse="$2"
cat $template | \ cat $template | \
...@@ -22,13 +22,13 @@ function extract_language () { ...@@ -22,13 +22,13 @@ function extract_language () {
} }
function get_lines () { get_lines() {
file=$1 file=$1
key=$2 key=$2
grep -i "^$key=" $file | cut -d= -f2- grep -i "^$key=" $file | cut -d= -f2-
} }
function get_items() { get_items() {
lang=$1 lang=$1
output="elisp-client-items.$lang" output="elisp-client-items.$lang"
...@@ -45,6 +45,12 @@ function get_items() { ...@@ -45,6 +45,12 @@ function get_items() {
done done
} }
TEST=`echo A | sed 's/\(A\|B\)/C/g'`
if [ "$TEST" = "A" ] ; then
echo "The version of sed on this computer is brain-damaged. Aborting."
exit 1
fi
get_items sv get_items sv
get_items en get_items en
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment