From 4db736912c88b6f0eb3aeec7726e3cb772029ad7 Mon Sep 17 00:00:00 2001 From: Max Richter Date: Sat, 7 Nov 2020 16:52:35 +0100 Subject: [PATCH] fix: change install.sh to be an actual bash script --- install.sh | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/install.sh b/install.sh index c02dbfb..733c7b9 100644 --- a/install.sh +++ b/install.sh @@ -1,24 +1,9 @@ -function isInstalled { - if [ "$(which $1)" != "" ]; then - return 0; - fi - return 1; -} - -function install { - # Check if program is already installed - if isInstalled $1; then - echo " - $1 is already installed" - else - echo " - installing $1 ..." - apt-get install $1 -y > /dev/null - echo " - finished" - fi -} - #Prerequesits -echo "-- Installing prerequisites --" +echo "-- Installing git --" install git +if [ "$(which $1)" != "" ]; then + apt-get install $1 -y > /dev/null +fi echo "-- Cloning repo --" git clone git@github.com:jim-fx/.dotfiles.git ~/.dotfiles