From f4c3b9deb9f931cd2284bb0a368e3147f1f74669 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Wed, 16 Sep 2015 17:00:38 +0100 Subject: Add Makefile for installation --- Makefile | 5 +++++ bin/clean | 9 +++++++++ bin/install | 9 +++++++++ install.sh | 28 ---------------------------- 4 files changed, 23 insertions(+), 28 deletions(-) create mode 100644 Makefile create mode 100644 bin/clean create mode 100644 bin/install delete mode 100755 install.sh diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0ee52ec --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +all : + ./bin/install + +clean : + ./bin/clean diff --git a/bin/clean b/bin/clean new file mode 100644 index 0000000..eb69236 --- /dev/null +++ b/bin/clean @@ -0,0 +1,9 @@ +#! /bin/bash +dotdir=/home/urbain/dotfiles +for file in `ls -A --ignore="install.sh" --ignore="README.md" --ignore=".git*"`; do + if [[ -f $file/Makefile ]]; then + cd $file && make && cd $dotdir + else + rm -f $HOME/$file && ln -s $dotdir/$file $HOME/$file + fi +done diff --git a/bin/install b/bin/install new file mode 100644 index 0000000..75eb89e --- /dev/null +++ b/bin/install @@ -0,0 +1,9 @@ +#! /bin/bash +dotdir=/home/urbain/dotfiles +for file in `ls -A --ignore="install.sh" --ignore="README.md" --ignore=".git*"`; do + if [[ -f $file/Makefile ]]; then + cd $file && make clean && cd $dotdir + else + rm -f $HOME/$file + fi +done diff --git a/install.sh b/install.sh deleted file mode 100755 index c06d497..0000000 --- a/install.sh +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/bash - -dotdir=/home/urbain/dotfiles - - -install_dotfiles() { - for file in `ls -A --ignore="install.sh" --ignore="README.md" --ignore=".git*"`; do - if [[ -f $file/Makefile ]]; then - cd $file && make && cd $dotdir - else - rm -f $HOME/$file && ln -s $dotdir/$file $HOME/$file - fi - done -} - - -clean_dotfiles() { - for file in `ls -A --ignore="install.sh" --ignore="README.md" --ignore=".git*"`; do - if [[ -f $file/Makefile ]]; then - cd $file && make clean && cd $dotdir - else - rm -f $HOME/$file - fi - done -} - -clean_dotfiles -install_dotfiles -- cgit v1.2.3