aboutsummaryrefslogtreecommitdiffhomepage
path: root/installer.sh
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2019-12-07 22:09:46 +0100
committercbdev <cb@cbcdn.com>2019-12-07 22:09:46 +0100
commit612ae7200b5f367af4a3f2553fb3f3851773c69a (patch)
tree9e7abdf89f2a50055b68e446a63ddd6b5d4c7d19 /installer.sh
parent1bb3b9a3eaf94af045c39a1ff1ee8bf9b8e5b8ec (diff)
parent565c75ff0c0b828b370179e0b877d629503794e5 (diff)
downloadmidimonster-612ae7200b5f367af4a3f2553fb3f3851773c69a.tar.gz
midimonster-612ae7200b5f367af4a3f2553fb3f3851773c69a.tar.bz2
midimonster-612ae7200b5f367af4a3f2553fb3f3851773c69a.zip
Merge branch 'master' of ssh://github.com/cbdevnet/midimonster
Diffstat (limited to 'installer.sh')
-rwxr-xr-xinstaller.sh28
1 files changed, 17 insertions, 11 deletions
diff --git a/installer.sh b/installer.sh
index eab9f50..fd4dd91 100755
--- a/installer.sh
+++ b/installer.sh
@@ -7,7 +7,6 @@ user=$(whoami) # for bypassing user check replace "$(whoami)" w
script_path="`cd $0; pwd`" # Script dir
tmp_path=$(mktemp -d) # Repo download path
-Iversion="v0.2" # (fallback version if )
makeargs=all # Build args
VAR_DESTDIR="" # Unused
@@ -36,14 +35,25 @@ echo ""
}
INSTALL-PREP () {
- echo "Starting Git!"
- git clone https://github.com/cbdevnet/midimonster.git "$tmp_path" # Gets Midimonster
- Iversion=(git describe --abbrev=0) # Get last tag(stable version)
- echo "Starting Git checkout to "$Iversion""
+(#### Subshell make things like cd $tmp_path easier to revert
+ echo "Starting download..."
+ git clone https://github.com/cbdevnet/midimonster.git "$tmp_path" # Gets Midimonster
+ echo ""
+ echo ""
+ echo "Initializing repository..."
+ cd $tmp_path
git init $tmp_path
- git checkout $Iversion $tmp_path
+ echo ""
+ echo "Finding latest stable version..."
+ Iversion=$(git describe --abbrev=0) # Get last tag(stable version)
+ echo "Starting Git checkout to "$Iversion"..."
+ git checkout -f -q $Iversion
+ echo "Done."
+ )
echo ""
+ echo ""
+ echo ""
read -e -i "$VAR_PREFIX" -p "PREFIX (Install root directory): " input # Reads VAR_PREFIX
VAR_PREFIX="${input:-$VAR_PREFIX}"
@@ -93,14 +103,10 @@ CLEAN () {
################################################ Main #################################################
-
trap ERROR SIGINT SIGTERM SIGKILL
clear
-if [ $user != "root" ]; then # Check if $user = root!
- echo "Installer must be run as root"
- ERROR
-fi
+if [ $user != "root" ]; then echo "Installer must be run as root"; ERROR; fi # Check if $user = root!
if [ $(wget -q --spider http://github.com) $? -eq 0 ]; then "INSTALL-DEPS"; else echo You need connection to the internet; ERROR ; fi