X-Git-Url: http://git.silcnet.org/gitweb/?p=autodist.git;a=blobdiff_plain;f=apps%2Fautodist%2Fautodist.in;h=26f91c582e4c177a35bde154fc7ae0735393ffaa;hp=00a7c95585758eb15c37a833aed072c34ef7c744;hb=db8d8eddb186e5bf75e5aa2e84dbc4c2ecd83605;hpb=17886a01cad2650b1421367d4f3f0eadc25261bb diff --git a/apps/autodist/autodist.in b/apps/autodist/autodist.in index 00a7c95..26f91c5 100755 --- a/apps/autodist/autodist.in +++ b/apps/autodist/autodist.in @@ -30,6 +30,47 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # +############################################################################### +# Shell compatibility + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + # XXX We actually may not work on zsh + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + + ############################################################################### # Global variables