aboutsummaryrefslogtreecommitdiffstats
path: root/bash_include
diff options
context:
space:
mode:
authorLAN-TW <lantw44@gmail.com>2013-12-09 21:58:52 +0800
committerLAN-TW <lantw44@gmail.com>2013-12-09 21:58:52 +0800
commit8036fd50355054388251a84c9dff16072fb1fc13 (patch)
tree7b8f876c2433555ebc03f3b11350558b51a87b06 /bash_include
parent1234cc26cca11feaa64f54baefafa182bde8746a (diff)
downloadconfigfile-8036fd50355054388251a84c9dff16072fb1fc13.tar
configfile-8036fd50355054388251a84c9dff16072fb1fc13.tar.gz
configfile-8036fd50355054388251a84c9dff16072fb1fc13.tar.bz2
configfile-8036fd50355054388251a84c9dff16072fb1fc13.tar.lz
configfile-8036fd50355054388251a84c9dff16072fb1fc13.tar.xz
configfile-8036fd50355054388251a84c9dff16072fb1fc13.tar.zst
configfile-8036fd50355054388251a84c9dff16072fb1fc13.zip
bash_include: 修正可能無法利用 $OSTYPE 測出 FreeBSD 的問題bash_include-20131209
Diffstat (limited to 'bash_include')
-rw-r--r--bash_include6
1 files changed, 3 insertions, 3 deletions
diff --git a/bash_include b/bash_include
index dba412e..bab1154 100644
--- a/bash_include
+++ b/bash_include
@@ -128,7 +128,7 @@ case "$OSTYPE" in
*gnu*)
alias ls='ls --color=always -F'
;;
- *freebsd*)
+ *freebsd*|*FreeBSD*)
alias ls='CLICOLOR=1 CLICOLOR_FORCE=1 ls -F'
export LSCOLORS='ExGxFxdxCxDxDxhbadacad'
;;
@@ -582,7 +582,7 @@ if [ -f ~/.bash_include ]; then
. ~/.bash_include
fi
EOF
- if [[ "$OSTYPE" == *freebsd* ]]; then
+ if [[ "$OSTYPE" == *freebsd* ]] || [[ "$OSTYPE" == *FreeBSD* ]]; then
cat >> ~/.bash_login << "EOF"
GET_TTY_NAME=`tty | cut -c 9`
[ "$GET_TTY_NAME" = 'v' ] && echo "Login from local virtual terminal: `tty`"
@@ -1301,7 +1301,7 @@ function get_memory_info ()
echo "Swap: $swapused / $swaptotal MB (`printf %2d $(($swapused*100/$swaptotal))`%)"
fi
;;
- *freebsd*)
+ *freebsd*|*FreeBSD*)
local mempagesize="`sysctl -n hw.pagesize`"
local mempagecount="`sysctl -n hw.availpages`"
local memactive="`sysctl -n vm.stats.vm.v_active_count`"