From 336bdaa5ee1fc2980c04f7584d6c42098ba49ee2 Mon Sep 17 00:00:00 2001 From: kn1cht Date: Mon, 25 Sep 2017 11:53:26 +0900 Subject: [PATCH] use Makefile --- .bash_profile | 10 ---------- .bashrc | 4 ---- .gitignore | 3 +++ .vimrc | 2 +- .zshrc | 4 ++-- Makefile | 7 +++++++ setup.sh | 7 ++++--- 7 files changed, 17 insertions(+), 20 deletions(-) delete mode 100644 .bash_profile create mode 100644 .gitignore create mode 100644 Makefile diff --git a/.bash_profile b/.bash_profile deleted file mode 100644 index bdca013..0000000 --- a/.bash_profile +++ /dev/null @@ -1,10 +0,0 @@ -if [ -f ~/.bashrc ] ; then - . ~/.bashrc -fi - -PATH="$HOME/.rbenv/bin:$PATH" -PATH="$PATH":/Users/RYK6U0327/isrb2 -PATH="$PATH:"/Applications/microchip/xc8/v1.35/bin"" -PATH=/opt/local/bin:/opt/local/sbin:$PATH -eval "$(rbenv init -)" - diff --git a/.bashrc b/.bashrc index 668a0a3..920bbbf 100644 --- a/.bashrc +++ b/.bashrc @@ -1,11 +1,7 @@ alias vv="g++ --std=c++11 -O2 -Wall" alias ls='ls -Ga' alias mkdir='mkdir -p' -export PATH="$PATH:"/Applications/microchip/xc8/v1.35/bin"" -export PATH=$PATH:/usr/local/share/git-core/contrib/diff-highlight export PATH=/opt/local/bin:/opt/local/sbin:$PATH -export PATH="$PATH":/Users/RYK6U0327/isrb2 -export PATH="$HOME/.rbenv/bin:$PATH" # C で標準出力をクリップボードにコピーする # mollifier delta blog : http://mollifier.hatenablog.com/entry/20100317/p1 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5a22eff --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.swp +*~ +.DS_Store diff --git a/.vimrc b/.vimrc index 21088c3..9e330d8 100644 --- a/.vimrc +++ b/.vimrc @@ -61,7 +61,7 @@ command! C call s:C() nmap :C function! s:C() :w - :!g++ --std=c++11 -O2 -Wall % -o x + :!g++ --std=c++14 -O2 -Wall % -o x :endfunction " F6キーでmake diff --git a/.zshrc b/.zshrc index da3d2b5..64a3139 100644 --- a/.zshrc +++ b/.zshrc @@ -40,10 +40,10 @@ alias md2pdf-ref='pandoc -f markdown -V documentclass=ltjarticle -V geometry:mar alias -g C='| pbcopy' export PATH=/opt/local/bin:/opt/local/sbin:~/bin:$PATH +export GOPATH=$HOME/.go/ export PATH=$HOME/.rbenv/bin:~/Library/Python/2.7/bin:~/.go/bin:$PATH export PATH=/Applications/microchip/xc8/v1.35/bin:$PATH export PATH=/usr/local/share/git-core/contrib/diff-highlight:$PATH -export PATH=/Users/RYK6U0327/isrb2:$PATH -export GOPATH=$HOME/.go/ +export PATH=$HOME/isrb2:$PATH export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig eval "$(rbenv init -)" diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..997cb62 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +EXCLUDES = .DS_Store .git .gitignore .gitmodules + +all: + @$(foreach val, $(filter-out $(EXCLUDES), $(wildcard .??*)), ln -sfnv $(abspath $(val)) $(HOME)/$(val);) + +clean: + @$(foreach val, $(filter-out $(EXCLUDES), $(wildcard .??*)), unlink $(HOME)/$(val);) diff --git a/setup.sh b/setup.sh index d984d67..102724d 100755 --- a/setup.sh +++ b/setup.sh @@ -1,10 +1,11 @@ #!/bin/bash -cd `dirname $0` +cd dirname $0 +ABSDIR=`pwd` -DOT_FILES=(.bashrc .bash_profile .vimrc .zshrc) +DOT_FILES=(.bashrc .vimrc .zshrc) for file in ${DOT_FILES[@]} do - ln -s ./$file $HOME/$file + ln -s $ABSDIR/$file $HOME/$file done