# Script written to be compatible with a variety of 'sh' derived shells: # ash, bash, dash ... explang="" # encoding inputs and outputs exptoenc="" expfromenc="" # see if the shell has any language environment variables set # see locale(7) manpage for this ordering. if test ! -z "$LC_ALL" ; then explang="$LC_ALL" elif test ! -z "$LANG"; then explang="$LANG" fi # note... all our output strings have the charset hard-coded, but # people may be using a different encoding in their terminal. LANG # strings look like "en_NZ.UTF-8". # Determine the requested output encoding case $explang in *.*) exptoenc=`echo $explang | sed 's/.*\.//'` ;; esac # Our French and Spanish strings are in 'iso-8859-1' (Latin 1) encoding; # Russian is the Cyrillic alphabet encoding, 'KOI8-R' case $explang in fr*|FR*) explang=fr expfromenc="iso-8859-1" ;; es*|ES*) explang=es expfromenc="iso-8859-1" ;; ru*|RU*) explang=ru expfromenc="koi8r" ;; *) # default explang=en expfromenc="iso-8859-1" ;; esac # "iconv" is the program for converting text between encodings. expiconv=`which iconv 2>/dev/null` if test $? -ne 0 || test ! -x "$expiconv" || test -z "$expfromenc" || test -z "$exptoenc"; then # we can't convert encodings from some reason expiconv="cat" else # add the encodings expiconv="$expiconv -f $expfromenc -t $exptoenc" fi # ASCII art generated at: # http://patorjk.com/software/taag/ # Font = Epic # echo " ______ ______ ______ ______ __________________ ______ ______ " echo "( ___ \|\ /|( ___ )( ___ \( __ \ \__ __/\__ __/( ___ \( ___ \\" echo "| ( \/( \ / )| ( )|| ( \/| ( \ ) ) ( ) ( | ( \/| ( \/" echo "| (_ \ (_) / | (___)|| (_ | | ) | | | | | | (_ | (_ " echo "| __) ) _ ( | ____)| __) | | | | | | | | | __) | __) " echo "| ( / ( ) \ | ( | ( | | ) | | | | | | ( | ( " echo "| (___/\( / \ )| ) | (___/\| (__/ )___) (___ | | | (___/\| (___/\\" echo "(______/|/ \||/ (______/(______/ \_______/ )_( (______/(______/" echo echo "(C) 2013, University of Waikato, New Zealand" echo echo echo # make sure we are sourced, and not run if test "$0" != "`echo $0 | sed s/expeditee-setup\.bash//`" ; then # if $0 contains "expeditee-setup.bash" we've been run... $0 is shellname if sourced. # One exception is zsh has an option to set it temporarily to the script name if test -z "$ZSH_NAME" ; then # we aren't using zsh expeditee_not_sourced=true fi fi if test -n "$expeditee_not_sourced" ; then case "$explang" in "es") eval $expiconv </dev/null 2>&1 # #if [ $? != 0 ] ; then # echo "Unable to find a Java runtime" >2 #else # echo "-----" # echo "To run the Expeditee Browser, type:" # echo " expeditee" # echo "" #fi