| @@ -38,16 +38,25 @@ gen_common(){ | |||||
| __ismsys=false | __ismsys=false | ||||
| __iscygwin=false | __iscygwin=false | ||||
| __iswindows=false | __iswindows=false | ||||
| __isdarwin=false | __isdarwin=false | ||||
| __isfreebsd=false | |||||
| __isbsd=false | |||||
| __islinux=false | __islinux=false | ||||
| # $OSTYPE is another choice. which is better? | # $OSTYPE is another choice. which is better? | ||||
| # sh on FreeBSD does not define OSTYPE | |||||
| case `uname` in | case `uname` in | ||||
| (MINGW*) __ismsys=true ;; | (MINGW*) __ismsys=true ;; | ||||
| (CYGWIN*) __iscygwin=true ;; | (CYGWIN*) __iscygwin=true ;; | ||||
| (Darwin*) __isdarwin=true ;; | (Darwin*) __isdarwin=true ;; | ||||
| (FreeBSD*) __isfreebsd=true ;; | |||||
| (Linux*) __islinux=true ;; | (Linux*) __islinux=true ;; | ||||
| esac | esac | ||||
| ( $__ismsys || $__iscygwin ) && __iswindows=true | ( $__ismsys || $__iscygwin ) && __iswindows=true | ||||
| # is this true? | |||||
| ( $__isdarwin || $__freebsd ) && __isbsd=true | |||||
| cat <<__EOC__ >"$__shrc_common" | cat <<__EOC__ >"$__shrc_common" | ||||
| #!/bin/sh | #!/bin/sh | ||||
| @@ -58,7 +67,11 @@ gen_common(){ | |||||
| ismsys=$__ismsys | ismsys=$__ismsys | ||||
| iscygwin=$__iscygwin | iscygwin=$__iscygwin | ||||
| iswindows=$__iswindows | iswindows=$__iswindows | ||||
| isdarwin=$__isdarwin | isdarwin=$__isdarwin | ||||
| isfreebsd=$__isfreebsd | |||||
| isbsd=$__isbsd | |||||
| islinux=$__islinux | islinux=$__islinux | ||||
| __homelocal="$__homelocal" | __homelocal="$__homelocal" | ||||