From 29ee36b708cb89ba8a91b39bc17ba6442c25c392 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Thu, 12 May 2022 23:37:19 +0800 Subject: Update --- Makefile | 41 +++++++++++++++++++++-------------------- README.md | 4 ++-- alias | 7 ++----- tools/init/load-settings.sh | 2 +- tools/install.sh | 6 +++--- 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 @@ .ONESHELL: .PHONY: * -all: git vim git tig gpg +all: git tig vim gpg mkdir -p ~/git +other: zsh fzf wiki pass mutt tmux + git: rm -f ~/.gitconfig ln -s `pwd`/gitconfig ~/.gitconfig - mkdir -p ~/HOME/git + mkdir -p ~/git tig: ln -sf `pwd`/tigrc ~/.tigrc @@ -22,6 +24,10 @@ vim: curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim ln -sf `pwd`/vimrc ~/.vim_runtime/my_configs.vim +gpg: + ln -sf `pwd`/misc/gpg-agent ~/.gnupg/gpg-agent.conf + gpgconf --reload gpg-agent + zsh: curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh | bash @@ -37,6 +43,19 @@ wiki: git clone git@github.com:typebrook/wiki.git ~/vimwiki; fi +pass: + if [ ! -d "$(HOME)/.password-store" ]; then + git clone ssh://vps/~/.password-store ~/.password-store; + fi + +mutt: + mkdir -p ~/.config/mutt + ln -sf `pwd`/mutt/muttrc ~/.config/mutt/muttrc + ln -sf `pwd`/mutt/mailcap ~/.mailcap + +tmux: + ln -sf `pwd`/misc/tmux.conf ~/.tmux.conf + crontab: (crontab -l 2>/dev/null; cat tools/cron/* | sed '/^#/ d') | crontab - @@ -50,29 +69,11 @@ task: git clone --depth 1 git@github.com:typebrook/task.git ~/.task; fi -gpg: - ln -sf `pwd`/misc/gpg-agent ~/.gnupg/gpg-agent.conf - gpgconf --reload gpg-agent - -mutt: - mkdir -p ~/.config/mutt - ln -sf `pwd`/mutt/muttrc ~/.config/mutt/muttrc - ln -sf `pwd`/mutt/mailcap ~/.mailcap - -tmux: - ln -sf `pwd`/misc/tmux.conf ~/.tmux.conf - -# Blog on my VPS blog: if [ ! -d "$(HOME)/blog" ]; then git clone ssh://vps/~/blog $(HOME)/blog; fi -pass: - if [ ! -d "$(HOME)/.password-store" ]; then - git clone ssh://vps/~/.password-store ~/.password-store; - fi - openbox: ln -sf `pwd`/misc/openbox/rc.xml ~/.config/openbox/ diff --git a/README.md b/README.md index de78d8f..03e277f 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ ## Getting Started **via curl** ``` -curl -fsS https://raw.githubusercontent.com/typebrook/settings/dev/tools/install.sh | bash +curl -fsS https://raw.githubusercontent.com/typebrook/helper/dev/tools/install.sh | bash # Or shorter curl -fsSL https://git.io/JUnU7 | bash ``` **via wget** ``` -wget -O- https://raw.githubusercontent.com/typebrook/settings/dev/tools/install.sh | bash +wget -O- https://raw.githubusercontent.com/typebrook/helper/dev/tools/install.sh | bash ``` diff --git a/alias b/alias index 34ba491..50956ac 100644 --- a/alias +++ b/alias @@ -236,11 +236,8 @@ upload_tig() { } # about custom settings -alias cds="cd $SETTING_DIR" -alias chs="tig -C $SETTING_DIR status" -cdss() { - cd $SETTING_DIR/tools/$1 || cd $SETTING_DIR/tools -} +alias cdh="cd $SETTING_DIR" +alias chh="tig -C $SETTING_DIR status" # about vimwiki 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 @@ -export SETTING_DIR=${SETTING_DIR:=$HOME/settings} +export SETTING_DIR=${SETTING_DIR:=$HOME/helper} export EDITOR=vim export TERM=xterm-256color 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 @@ set -e # Default settings -SETTING_DIR=${SETTING_DIR:-~/settings} -REPO=${REPO:-typebrook/settings} +SETTING_DIR=${SETTING_DIR:-~/helper} +REPO=${REPO:-typebrook/helper} REMOTE=${REMOTE:-https://github.com/${REPO}.git} BRANCH=${BRANCH:-dev} RCFILE=${RCFILE:-~/.$(basename $SHELL)rc} if [ ! -d $SETTING_DIR ]; then git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$SETTING_DIR" || { - error "git clone of settings repo failed" + error "git clone of helper repo failed" exit 1 } fi -- cgit v1.2.3-70-g09d2