Browse Source

rename setup.sh func

pull/1/head
10sr 12 years ago
parent
commit
2a47308c44
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      setup.sh

+ 6
- 6
setup.sh View File

@@ -3,7 +3,7 @@
mkdir -p ~/.my/log mkdir -p ~/.my/log
mkdir -p ~/.local/bin mkdir -p ~/.local/bin


_my_install_script(){
install_script(){
local dir="$HOME/.local/bin" local dir="$HOME/.local/bin"
mkdir -p "$dir" mkdir -p "$dir"
for f in "$@" for f in "$@"
@@ -23,7 +23,7 @@ _my_install_script(){
done done
} }


_my_install_symlink_script(){
install_symlink_script(){
mkdir -p "$HOME/.local/bin/" mkdir -p "$HOME/.local/bin/"
for f in "$@" for f in "$@"
do do
@@ -31,7 +31,7 @@ _my_install_symlink_script(){
done done
} }


_my_git_config(){
git_config(){
git config --global user.name '10sr' git config --global user.name '10sr'
git config --global user.email '8slashes+git@gmail.com' git config --global user.email '8slashes+git@gmail.com'
git config --global core.autocrlf false git config --global core.autocrlf false
@@ -53,17 +53,17 @@ _my_git_config(){
# git config --global alias.my-ls "ls-files | xargs ls" # git config --global alias.my-ls "ls-files | xargs ls"
# git config --global alias.ll "!git ls-files | xargs ls -l -CFG --color=auto --time-style=long-iso" # git config --global alias.ll "!git ls-files | xargs ls -l -CFG --color=auto --time-style=long-iso"
git config --global alias.addi "add -i" git config --global alias.addi "add -i"
if false; then
if false iswindows; then
git config --global core.fileMode false git config --global core.fileMode false
fi fi
} }


_gen_source_script(){
gen_source_script(){
# _gen_source_script file lines # _gen_source_script file lines
test $# -eq 2 || return 1 test $# -eq 2 || return 1
head -n $2 $1 | \grep -v '^#!' | sed -e 's/^..//g' head -n $2 $1 | \grep -v '^#!' | sed -e 's/^..//g'
} }


_my_install_script http://www.frexx.de/xterm-256-notes/data/colortable16.sh http://www.frexx.de/xterm-256-notes/data/256colors2.pl
install_script http://www.frexx.de/xterm-256-notes/data/colortable16.sh http://www.frexx.de/xterm-256-notes/data/256colors2.pl


type git >/dev/null 2>&1 && _my_git_config type git >/dev/null 2>&1 && _my_git_config

Loading…
Cancel
Save