aboutsummaryrefslogtreecommitdiffhomepage
path: root/installer.sh
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2019-12-08 02:52:02 +0100
committercbdev <cb@cbcdn.com>2019-12-08 02:52:02 +0100
commitac4aa9935bfb6406c71ea5ed14a68bd41617b701 (patch)
treef2aa863a8a3a8a41591da84d3df1ca904245f4f8 /installer.sh
parent99d31eabf4a3afa4fd54782cc1d7cd92fbdae084 (diff)
parent4ca0acff460c1c02a11cb9f246fb755cd4f4f792 (diff)
downloadmidimonster-ac4aa9935bfb6406c71ea5ed14a68bd41617b701.tar.gz
midimonster-ac4aa9935bfb6406c71ea5ed14a68bd41617b701.tar.bz2
midimonster-ac4aa9935bfb6406c71ea5ed14a68bd41617b701.zip
Merge branch 'master' into rtpmidi
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