Browse files

reload et correction install

  • Loading branch information...
1 parent 1163602 commit ca6295b48aedc4c0a908a3f5219e7452d03ad75d @nanark committed Mar 12, 2012
Showing with 49 additions and 32 deletions.
  1. +2 −2 .gitmodules
  2. +1 −0 _vim
  3. +21 −15 install.sh
  4. +25 −14 reload.sh
  5. +0 −1 vim
View
4 .gitmodules
@@ -1,3 +1,3 @@
-[submodule "vim"]
- path = vim
+[submodule "_vim"]
+ path = _vim
url = git@github.com:nanark/.vim.git
1 _vim
@@ -0,0 +1 @@
+Subproject commit a52572cc291f6cb0268e2472ed47a48f74b119a7
View
36 install.sh
@@ -1,26 +1,32 @@
#!/usr/bin/env bash
function link_file {
- source="${PWD}/$1"
- target="${HOME}/${1/_/.}"
-
+ source="${PWD}/$1"
+ target="${HOME}/${1/_/.}"
if [ -e "${target}" ]; then
mv $target $target.bak
fi
+ ln -sf ${source} ${target}
+}
- ln -sf ${source} ${target}
+function sub_link_file {
+ source="${PWD}/$1"
+ file=${1##*/}
+ target="${HOME}/${file/_/.}"
+ if [ -e "${target}" ]; then
+ mv $target $target.bak
+ fi
+ ln -sf ${source} ${target}
}
-if [ "$1" = "vim" ]; then
- for i in _vim*
- do
- link_file $i
- done
-else
- for i in _*
- do
- link_file $i
- done
-fi
+for i in _vim/_*
+do
+ sub_link_file $i
+done
+
+for i in _*
+do
+ link_file $i
+done
git submodule sync
git submodule init
View
39 reload.sh
@@ -1,22 +1,33 @@
#!/usr/bin/env bash
function link_file {
- source="${PWD}/$1"
- target="${HOME}/${1/_/.}"
+ source="${PWD}/$1"
+ target="${HOME}/${1/_/.}"
+ if [ -e "${target}" ]; then
+ rm ${target}
+ fi
+ ln -sf ${source} ${target}
+}
- ln -sf ${source} ${target}
+function sub_link_file {
+ source="${PWD}/$1"
+ file=${1##*/}
+ target="${HOME}/${file/_/.}"
+ if [ -e "${target}" ]; then
+ rm ${target}
+ fi
+ ln -sf ${source} ${target}
}
-if [ "$1" = "vim" ]; then
- for i in _vim*
- do
- link_file $i
- done
-else
- for i in _*
- do
- link_file $i
- done
-fi
+for i in _vim/_*
+do
+ sub_link_file $i
+done
+
+for i in _*
+do
+ link_file $i
+done
+
git submodule sync
git submodule init
1 vim
@@ -1 +0,0 @@
-Subproject commit 760bfe79894ebac749c3f17e44f61373df7d05fb

0 comments on commit ca6295b

Please sign in to comment.