diff options
| -rw-r--r-- | Makefile | 41 | ||||
| -rw-r--r-- | README.md | 4 | ||||
| -rw-r--r-- | alias | 7 | ||||
| -rwxr-xr-x | tools/init/load-settings.sh | 2 | ||||
| -rwxr-xr-x | tools/install.sh | 6 |
5 files changed, 29 insertions, 31 deletions
| @@ -1,13 +1,15 @@ | |||
| 1 | .ONESHELL: | 1 | .ONESHELL: |
| 2 | .PHONY: * | 2 | .PHONY: * |
| 3 | 3 | ||
| 4 | all: git vim git tig gpg | 4 | all: git tig vim gpg |
| 5 | mkdir -p ~/git | 5 | mkdir -p ~/git |
| 6 | 6 | ||
| 7 | other: zsh fzf wiki pass mutt tmux | ||
| 8 | |||
| 7 | git: | 9 | git: |
| 8 | rm -f ~/.gitconfig | 10 | rm -f ~/.gitconfig |
| 9 | ln -s `pwd`/gitconfig ~/.gitconfig | 11 | ln -s `pwd`/gitconfig ~/.gitconfig |
| 10 | mkdir -p ~/HOME/git | 12 | mkdir -p ~/git |
| 11 | 13 | ||
| 12 | tig: | 14 | tig: |
| 13 | ln -sf `pwd`/tigrc ~/.tigrc | 15 | ln -sf `pwd`/tigrc ~/.tigrc |
| @@ -22,6 +24,10 @@ vim: | |||
| 22 | curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | 24 | curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |
| 23 | ln -sf `pwd`/vimrc ~/.vim_runtime/my_configs.vim | 25 | ln -sf `pwd`/vimrc ~/.vim_runtime/my_configs.vim |
| 24 | 26 | ||
| 27 | gpg: | ||
| 28 | ln -sf `pwd`/misc/gpg-agent ~/.gnupg/gpg-agent.conf | ||
| 29 | gpgconf --reload gpg-agent | ||
| 30 | |||
| 25 | zsh: | 31 | zsh: |
| 26 | curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh | bash | 32 | curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh | bash |
| 27 | 33 | ||
| @@ -37,6 +43,19 @@ wiki: | |||
| 37 | git clone git@github.com:typebrook/wiki.git ~/vimwiki; | 43 | git clone git@github.com:typebrook/wiki.git ~/vimwiki; |
| 38 | fi | 44 | fi |
| 39 | 45 | ||
| 46 | pass: | ||
| 47 | if [ ! -d "$(HOME)/.password-store" ]; then | ||
| 48 | git clone ssh://vps/~/.password-store ~/.password-store; | ||
| 49 | fi | ||
| 50 | |||
| 51 | mutt: | ||
| 52 | mkdir -p ~/.config/mutt | ||
| 53 | ln -sf `pwd`/mutt/muttrc ~/.config/mutt/muttrc | ||
| 54 | ln -sf `pwd`/mutt/mailcap ~/.mailcap | ||
| 55 | |||
| 56 | tmux: | ||
| 57 | ln -sf `pwd`/misc/tmux.conf ~/.tmux.conf | ||
| 58 | |||
| 40 | crontab: | 59 | crontab: |
| 41 | (crontab -l 2>/dev/null; cat tools/cron/* | sed '/^#/ d') | crontab - | 60 | (crontab -l 2>/dev/null; cat tools/cron/* | sed '/^#/ d') | crontab - |
| 42 | 61 | ||
| @@ -50,29 +69,11 @@ task: | |||
| 50 | git clone --depth 1 git@github.com:typebrook/task.git ~/.task; | 69 | git clone --depth 1 git@github.com:typebrook/task.git ~/.task; |
| 51 | fi | 70 | fi |
| 52 | 71 | ||
| 53 | gpg: | ||
| 54 | ln -sf `pwd`/misc/gpg-agent ~/.gnupg/gpg-agent.conf | ||
| 55 | gpgconf --reload gpg-agent | ||
| 56 | |||
| 57 | mutt: | ||
| 58 | mkdir -p ~/.config/mutt | ||
| 59 | ln -sf `pwd`/mutt/muttrc ~/.config/mutt/muttrc | ||
| 60 | ln -sf `pwd`/mutt/mailcap ~/.mailcap | ||
| 61 | |||
| 62 | tmux: | ||
| 63 | ln -sf `pwd`/misc/tmux.conf ~/.tmux.conf | ||
| 64 | |||
| 65 | # Blog on my VPS | ||
| 66 | blog: | 72 | blog: |
| 67 | if [ ! -d "$(HOME)/blog" ]; then | 73 | if [ ! -d "$(HOME)/blog" ]; then |
| 68 | git clone ssh://vps/~/blog $(HOME)/blog; | 74 | git clone ssh://vps/~/blog $(HOME)/blog; |
| 69 | fi | 75 | fi |
| 70 | 76 | ||
| 71 | pass: | ||
| 72 | if [ ! -d "$(HOME)/.password-store" ]; then | ||
| 73 | git clone ssh://vps/~/.password-store ~/.password-store; | ||
| 74 | fi | ||
| 75 | |||
| 76 | openbox: | 77 | openbox: |
| 77 | ln -sf `pwd`/misc/openbox/rc.xml ~/.config/openbox/ | 78 | ln -sf `pwd`/misc/openbox/rc.xml ~/.config/openbox/ |
| 78 | 79 | ||
| @@ -1,12 +1,12 @@ | |||
| 1 | ## Getting Started | 1 | ## Getting Started |
| 2 | **via curl** | 2 | **via curl** |
| 3 | ``` | 3 | ``` |
| 4 | curl -fsS https://raw.githubusercontent.com/typebrook/settings/dev/tools/install.sh | bash | 4 | curl -fsS https://raw.githubusercontent.com/typebrook/helper/dev/tools/install.sh | bash |
| 5 | 5 | ||
| 6 | # Or shorter | 6 | # Or shorter |
| 7 | curl -fsSL https://git.io/JUnU7 | bash | 7 | curl -fsSL https://git.io/JUnU7 | bash |
| 8 | ``` | 8 | ``` |
| 9 | **via wget** | 9 | **via wget** |
| 10 | ``` | 10 | ``` |
| 11 | wget -O- https://raw.githubusercontent.com/typebrook/settings/dev/tools/install.sh | bash | 11 | wget -O- https://raw.githubusercontent.com/typebrook/helper/dev/tools/install.sh | bash |
| 12 | ``` | 12 | ``` |
| @@ -236,11 +236,8 @@ upload_tig() { | |||
| 236 | } | 236 | } |
| 237 | 237 | ||
| 238 | # about custom settings | 238 | # about custom settings |
| 239 | alias cds="cd $SETTING_DIR" | 239 | alias cdh="cd $SETTING_DIR" |
| 240 | alias chs="tig -C $SETTING_DIR status" | 240 | alias chh="tig -C $SETTING_DIR status" |
| 241 | cdss() { | ||
| 242 | cd $SETTING_DIR/tools/$1 || cd $SETTING_DIR/tools | ||
| 243 | } | ||
| 244 | 241 | ||
| 245 | # about vimwiki | 242 | # about vimwiki |
| 246 | alias cdw='cd ~/vimwiki' | 243 | alias cdw='cd ~/vimwiki' |
diff --git a/tools/init/load-settings.sh b/tools/init/load-settings.sh index c87c5c6..cf28b75 100755 --- a/tools/init/load-settings.sh +++ b/tools/init/load-settings.sh | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | export SETTING_DIR=${SETTING_DIR:=$HOME/settings} | 1 | export SETTING_DIR=${SETTING_DIR:=$HOME/helper} |
| 2 | export EDITOR=vim | 2 | export EDITOR=vim |
| 3 | export TERM=xterm-256color | 3 | export TERM=xterm-256color |
| 4 | 4 | ||
diff --git a/tools/install.sh b/tools/install.sh index 27418c6..1f1dd86 100755 --- a/tools/install.sh +++ b/tools/install.sh | |||
| @@ -3,15 +3,15 @@ | |||
| 3 | set -e | 3 | set -e |
| 4 | 4 | ||
| 5 | # Default settings | 5 | # Default settings |
| 6 | SETTING_DIR=${SETTING_DIR:-~/settings} | 6 | SETTING_DIR=${SETTING_DIR:-~/helper} |
| 7 | REPO=${REPO:-typebrook/settings} | 7 | REPO=${REPO:-typebrook/helper} |
| 8 | REMOTE=${REMOTE:-https://github.com/${REPO}.git} | 8 | REMOTE=${REMOTE:-https://github.com/${REPO}.git} |
| 9 | BRANCH=${BRANCH:-dev} | 9 | BRANCH=${BRANCH:-dev} |
| 10 | RCFILE=${RCFILE:-~/.$(basename $SHELL)rc} | 10 | RCFILE=${RCFILE:-~/.$(basename $SHELL)rc} |
| 11 | 11 | ||
| 12 | if [ ! -d $SETTING_DIR ]; then | 12 | if [ ! -d $SETTING_DIR ]; then |
| 13 | git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$SETTING_DIR" || { | 13 | git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$SETTING_DIR" || { |
| 14 | error "git clone of settings repo failed" | 14 | error "git clone of helper repo failed" |
| 15 | exit 1 | 15 | exit 1 |
| 16 | } | 16 | } |
| 17 | fi | 17 | fi |