install.sh
1	#!/bin/bash
2
3 installDir="$HOME/.local/bin/"
4 sgDir="$HOME/.sg"
5 libDir="/usr/local/lib/SimplyGit/"
6
7 if [ ! -d $installDir ]; then
8 echo "Making $installDir"
9 mkdir -p $installDir
10 fi
11
12 if [ ! -d $libDir ]; then
13 echo "Making $libDir"
14 sudo mkdir -p $libDir
15 fi
16
17 if [ ! -d $sgDir ]; then
18 echo "Making $sgDir"
19 mkdir -p $sgDir
20 fi
21
22 echo "Copying bin"
23 cp ./sg $installDir
24
25 if [ ! -f $sgDir/sg.config ]; then
26 echo "Copying default config"
27 cp ./example.config $sgDir/sg.config
28 else
29 echo "Found config file not overwriting"
30 fi
31
32 echo "Calling sudo to copy libs"
33 sudo cp ./lib/SimplyGit/* $libDir