diff options
author | LAN-TW <lantw44@gmail.com> | 2013-11-12 01:26:19 +0800 |
---|---|---|
committer | LAN-TW <lantw44@gmail.com> | 2013-11-12 01:26:19 +0800 |
commit | d3b8ea8117cdc6ae39124d7c96459fb3226f6b35 (patch) | |
tree | 729dd909835c2e248b83a117004cd2bcf96f867a /bash_include | |
parent | 677e26786b5f67d411d90aa6efcebd30e26ec35c (diff) | |
download | configfile-d3b8ea8117cdc6ae39124d7c96459fb3226f6b35.tar configfile-d3b8ea8117cdc6ae39124d7c96459fb3226f6b35.tar.gz configfile-d3b8ea8117cdc6ae39124d7c96459fb3226f6b35.tar.bz2 configfile-d3b8ea8117cdc6ae39124d7c96459fb3226f6b35.tar.lz configfile-d3b8ea8117cdc6ae39124d7c96459fb3226f6b35.tar.xz configfile-d3b8ea8117cdc6ae39124d7c96459fb3226f6b35.tar.zst configfile-d3b8ea8117cdc6ae39124d7c96459fb3226f6b35.zip |
bash_include: 提升與 NetBSD 的相容性,支援 ftp 下載指令bash_include-20131112
Diffstat (limited to 'bash_include')
-rw-r--r-- | bash_include | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/bash_include b/bash_include index c233bf0..7e41538 100644 --- a/bash_include +++ b/bash_include @@ -93,7 +93,7 @@ HISTTIMEFORMAT="%F %T " historycountfile="$HOME/.bash_history.count" historybackupfile="$HOME/.bash_history.bak" -realpath_program="realpath" +realpath_program="readlink -f" bgrunfiledir="$HOME/tmp/bgrun-`whoami`" trashdir="$HOME/trash" @@ -1047,11 +1047,14 @@ function fetch_remote_file () if check_command_existent curl; then curl -f -o "$1" "$2" rval=$? + elif check_command_existent wget; then + wget --progress=dot -O "$1" "$2" + rval=$? elif check_command_existent fetch; then fetch -o "$1" "$2" rval=$? - elif check_command_existent wget; then - wget --progress=dot -O "$1" "$2" + elif check_command_existent ftp; then + ftp -o "$1" "$2" rval=$? else echo "<== Sorry, I don't know how to fetch remote files on your system" @@ -1747,14 +1750,7 @@ then [ "$TERM" = screen ] && TERM=screen-256color fi -if [ "`uname`" = "Linux" ] -then - [ "$interactive_shell" ] && echo "Setting special things for Linux" - realpath_program="readlink -f" - ulimit -S -c unlimited 2> /dev/null -fi - -[ "$interactive_shell" ] && echo "Setting shell options" +[ "$interactive_shell" ] && echo "Setting shell options, completions, limits" shopt -s histappend shopt -s checkwinsize @@ -1771,6 +1767,7 @@ complete -A variable varset complete -A variable path_editor complete -A user mkscreenacl +ulimit -S -c unlimited 2> /dev/null [ "$interactive_shell" ] && { if [ "$WINDOW" ] && type screen &> /dev/null; then |