aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHsieh Chin Fan <typebrook@gmail.com>2022-05-12 23:37:19 +0800
committerHsieh Chin Fan <typebrook@gmail.com>2022-05-12 23:37:19 +0800
commit29ee36b708cb89ba8a91b39bc17ba6442c25c392 (patch)
treefc5ce67ce503d86468d0b47e77e3d8ce358d6ec4
parentb6e40bb0bd42d0d9ec757d6e0c38a03898bb248e (diff)
Update
-rw-r--r--Makefile41
-rw-r--r--README.md4
-rw-r--r--alias7
-rwxr-xr-xtools/init/load-settings.sh2
-rwxr-xr-xtools/install.sh6
5 files changed, 29 insertions, 31 deletions
diff --git a/Makefile b/Makefile
index 51b26af..d19663a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,15 @@
1.ONESHELL: 1.ONESHELL:
2.PHONY: * 2.PHONY: *
3 3
4all: git vim git tig gpg 4all: git tig vim gpg
5 mkdir -p ~/git 5 mkdir -p ~/git
6 6
7other: zsh fzf wiki pass mutt tmux
8
7git: 9git:
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
12tig: 14tig:
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
27gpg:
28 ln -sf `pwd`/misc/gpg-agent ~/.gnupg/gpg-agent.conf
29 gpgconf --reload gpg-agent
30
25zsh: 31zsh:
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
46pass:
47 if [ ! -d "$(HOME)/.password-store" ]; then
48 git clone ssh://vps/~/.password-store ~/.password-store;
49 fi
50
51mutt:
52 mkdir -p ~/.config/mutt
53 ln -sf `pwd`/mutt/muttrc ~/.config/mutt/muttrc
54 ln -sf `pwd`/mutt/mailcap ~/.mailcap
55
56tmux:
57 ln -sf `pwd`/misc/tmux.conf ~/.tmux.conf
58
40crontab: 59crontab:
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
53gpg:
54 ln -sf `pwd`/misc/gpg-agent ~/.gnupg/gpg-agent.conf
55 gpgconf --reload gpg-agent
56
57mutt:
58 mkdir -p ~/.config/mutt
59 ln -sf `pwd`/mutt/muttrc ~/.config/mutt/muttrc
60 ln -sf `pwd`/mutt/mailcap ~/.mailcap
61
62tmux:
63 ln -sf `pwd`/misc/tmux.conf ~/.tmux.conf
64
65# Blog on my VPS
66blog: 72blog:
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
71pass:
72 if [ ! -d "$(HOME)/.password-store" ]; then
73 git clone ssh://vps/~/.password-store ~/.password-store;
74 fi
75
76openbox: 77openbox:
77 ln -sf `pwd`/misc/openbox/rc.xml ~/.config/openbox/ 78 ln -sf `pwd`/misc/openbox/rc.xml ~/.config/openbox/
78 79
diff --git a/README.md b/README.md
index de78d8f..03e277f 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,12 @@
1## Getting Started 1## Getting Started
2**via curl** 2**via curl**
3``` 3```
4curl -fsS https://raw.githubusercontent.com/typebrook/settings/dev/tools/install.sh | bash 4curl -fsS https://raw.githubusercontent.com/typebrook/helper/dev/tools/install.sh | bash
5 5
6# Or shorter 6# Or shorter
7curl -fsSL https://git.io/JUnU7 | bash 7curl -fsSL https://git.io/JUnU7 | bash
8``` 8```
9**via wget** 9**via wget**
10``` 10```
11wget -O- https://raw.githubusercontent.com/typebrook/settings/dev/tools/install.sh | bash 11wget -O- https://raw.githubusercontent.com/typebrook/helper/dev/tools/install.sh | bash
12``` 12```
diff --git a/alias b/alias
index 34ba491..50956ac 100644
--- a/alias
+++ b/alias
@@ -236,11 +236,8 @@ upload_tig() {
236} 236}
237 237
238# about custom settings 238# about custom settings
239alias cds="cd $SETTING_DIR" 239alias cdh="cd $SETTING_DIR"
240alias chs="tig -C $SETTING_DIR status" 240alias chh="tig -C $SETTING_DIR status"
241cdss() {
242 cd $SETTING_DIR/tools/$1 || cd $SETTING_DIR/tools
243}
244 241
245# about vimwiki 242# about vimwiki
246alias cdw='cd ~/vimwiki' 243alias 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 @@
1export SETTING_DIR=${SETTING_DIR:=$HOME/settings} 1export SETTING_DIR=${SETTING_DIR:=$HOME/helper}
2export EDITOR=vim 2export EDITOR=vim
3export TERM=xterm-256color 3export 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 @@
3set -e 3set -e
4 4
5# Default settings 5# Default settings
6SETTING_DIR=${SETTING_DIR:-~/settings} 6SETTING_DIR=${SETTING_DIR:-~/helper}
7REPO=${REPO:-typebrook/settings} 7REPO=${REPO:-typebrook/helper}
8REMOTE=${REMOTE:-https://github.com/${REPO}.git} 8REMOTE=${REMOTE:-https://github.com/${REPO}.git}
9BRANCH=${BRANCH:-dev} 9BRANCH=${BRANCH:-dev}
10RCFILE=${RCFILE:-~/.$(basename $SHELL)rc} 10RCFILE=${RCFILE:-~/.$(basename $SHELL)rc}
11 11
12if [ ! -d $SETTING_DIR ]; then 12if [ ! -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 }
17fi 17fi