diff options
author | Karel Kočí <karel.koci@nic.cz> | 2016-09-06 16:09:53 +0200 |
---|---|---|
committer | Karel Kočí <karel.koci@nic.cz> | 2016-09-06 16:09:53 +0200 |
commit | c3cc78165124b6b8b851daf119bce1530b394199 (patch) | |
tree | 4bfc129f1f1132ff11bf680a9d9784c6c0ec88ab | |
parent | 2025576ccc4bb6db2561dacaa1229076cd98a346 (diff) | |
download | myconfigs-c3cc78165124b6b8b851daf119bce1530b394199.tar.gz myconfigs-c3cc78165124b6b8b851daf119bce1530b394199.tar.bz2 myconfigs-c3cc78165124b6b8b851daf119bce1530b394199.zip |
fix install scripts diff
-rwxr-xr-x | install | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -18,14 +18,10 @@ dodiff() { vimdiff "$1" "$2" } diff() { - # Ignore some folders. - if ! echo $1 | sed '/vim/q1' >/dev/null; then - continue - fi - # Iterate trough source directory + # Iterate trough source directory but ignore any git repositories # Note that its design decision to not iterate trough target directory. if [ -d "$1" ]; then - for f in `find "$1" -type f`; do + for f in `find "$1" \( -type d -exec test -e '{}'/.git \; \) -prune -o -type f -print`; do F="${f#$1/}" echo $f dodiff "$1/$F" "$2/$F" @@ -48,7 +44,7 @@ inst() { doinst $1 $2 } -# TODO if on archlinux install pkgstats +# TODO if on archlinux install pkgstats and other packages we would need for every feature read -p "Install Bashrc? (Y/n) " if [[ $REPLY =~ ^[Yy]?$ ]]; then @@ -65,13 +61,15 @@ fi read -p "Install GIT configuration? (Y/n) " if [[ $REPLY =~ ^[Yy]?$ ]]; then inst gitconfig ~/.gitconfig - inst local/.git-prompt.sh ~/.local/ + inst local/git-prompt.sh ~/.local/ fi read -p "Install VIM scripts? (Y/n) " if [[ $REPLY =~ ^[Yy]?$ ]]; then inst vimrc ~/.vimrc inst vim ~/.vim + mkdir -p ~/.cache/vim # directory for *.swp files + mkdir -p ~/.cache/vim-undo # directory for undo files echo "Please don't forget to setup YouCompleteMe" fi |