17e640f990250982e12f6df9fbb32d7dd79f0822
commit 17e640f990250982e12f6df9fbb32d7dd79f0822
Author: spesk1 <spesk@pm.me>
Date: Sun Jun 30 10:01:46 2019 -0400

Updated install to not overwrite config if already in place

diff --git a/install.sh b/install.sh
index 33eecf1..09e89ed 100755
--- a/install.sh
+++ b/install.sh
@@ -1,6 +1,7 @@
#!/bin/bash

installDir="$HOME/.local/bin/"
+sgDir="$HOME/.sg"
libDir="/usr/local/lib/SimplyGit/"

if [ ! -d $installDir ]; then
@@ -13,8 +14,20 @@ if [ ! -d $libDir ]; then
sudo mkdir -p $libDir
fi

+if [ ! -d $sgDir ]; then
+ echo "Making $sgDir"
+ mkdir -p $sgDir
+fi
+
echo "Copying bin"
cp ./sg $installDir

+if [ ! -f $sgDir/sg.config ]; then
+ echo "Copying default config"
+ cp ./example.config $sgDir/sg.config
+else
+ echo "Found config file not overwriting"
+fi
+
echo "Calling sudo to copy libs"
sudo cp ./lib/SimplyGit/* $libDir