#!/bin/bash
#sed 's/registerLanguage("/&\n/g' highlight.pack.js | sed 's/".*//' | sed '1d' | sort

if [ -z "$1" ] ; then
  echo "Usage: $0 <file>"
  exit 1
fi

listall() {
  egrep -o 'registerLanguage\("[^"]+"' $1 | sed 's/registerLanguage("\(.*\)"/\1/' | sort
}
listall $1

echo -e "\n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Not in data/languages-all.json:"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
grep -vw -f <(sed 's/^"\([^"]*\)".*/\1/' data/languages-all.json) <(listall $1)

#!/bin/bash
#sed 's/registerLanguage("/&\n/g' highlight.pack.js | sed 's/".*//' | sed '1d' | sort

if [ -z "$1" ] ; then
  echo "Usage: $0 <file>"
  exit 1
fi

listall() {
  egrep -o 'registerLanguage\("[^"]+"' $1 | sed 's/registerLanguage("\(.*\)"/\1/' | sort
}
listall $1

echo -e "\n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Not in popup/languages-list_all.json :"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
grep -vw -f <(sed 's/^"\([^"]*\)".*/\1/' popup/languages-list_all.json ) <(listall $1)

Update script to check language list
Update script to check language list

... Since the location of the file containing the list of languages has
moved when the add-on was turned into a web-extension.
