From: David Thompson Date: Fri, 27 Jun 2014 19:24:10 +0000 (-0400) Subject: Add script to enable/disable links to translations. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4e5a60e6857ae6d43ecc828174840b57adcd9411;p=enc.git Add script to enable/disable links to translations. --- diff --git a/toggle-lang b/toggle-lang new file mode 100755 index 00000000..c59452d6 --- /dev/null +++ b/toggle-lang @@ -0,0 +1,22 @@ +#!/bin/bash +# Really quick hacky script to comment/uncomment links to translations +# of the GPG guide. + +enc_mode=$1 +enc_lang=$2 + +if [ $enc_mode = 'enable' ] +then + # Regex to match
  • tag with language link + enc_regex="" + # Uncomment it + sed -i "s/$enc_regex/\1/" **/*.html +elif [ $enc_mode = 'disable' ] +then + # Regex to match
  • tag with language link + enc_regex="\(
  • \)" + # Comment it out + sed -i "s/$enc_regex//" **/*.html +else + echo 'Usage: toggle-lang enable|disable ' +fi