| 1 | #!/bin/bash |
| 2 | # A script to check if the variables are OK for bash shell script. |
| 3 | if [ -z "$(echo "$LANG" | grep -iE "(UTF-8|utf8)")" ]; then |
| 4 | echo "This program must be run in UTF-8 environment!" |
| 5 | echo "Now the environment variable LANG is: $LANG" |
| 6 | echo "Program terminated!" |
| 7 | exit 1 |
| 8 | fi |
| 9 | prog="$(basename $0)" |
| 10 | for i in ./*; do |
| 11 | nm="$(basename $i)" |
| 12 | [ "$nm" = "$prog" ] && continue |
| 13 | # BIG5 is the only exception. Skip it. |
| 14 | [ -n "$(echo $nm | grep -i big5)" ] && continue |
| 15 | # skip dir |
| 16 | [ -d "$nm" ] && continue |
| 17 | echo "Checking $nm..." |
| 18 | . $nm |
| 19 | done |