From 2cb91753b2cab927fca9107128519872ac70665d Mon Sep 17 00:00:00 2001 From: Spacelord Date: Fri, 6 Dec 2019 19:58:16 +0100 Subject: Initial installer release --- installer.sh | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 installer.sh (limited to 'installer.sh') diff --git a/installer.sh b/installer.sh new file mode 100644 index 0000000..fa898fb --- /dev/null +++ b/installer.sh @@ -0,0 +1,109 @@ +#!/bin/bash + +################################################ SETUP ################################################ +deps=(libasound2-dev libevdev-dev liblua5.3-dev libola-dev libjack-jackd2-dev pkg-config libssl-dev gcc make wget git) +user=$(whoami) # for bypassing user check replace "$(whoami)" with "root". + +script_path="`cd $0; pwd`" # Script dir +tmp_path=$(mktemp -d) # Repo download path + +Iversion="v0.2" # (fallback version if ) +makeargs=full # Build args + +VAR_DESTDIR="" # Unused +VAR_PREFIX="/usr" +VAR_PLUGINS="$VAR_PREFIX/lib/midimonster" +VAR_DEFAULT_CFG="/etc/midimonster/midimonster.cfg" +VAR_EXAMPLE_CFGS="$VAR_PREFIX/share/midimonster" + +################################################ SETUP ################################################ + +############################################## FUNCTIONS ############################################## + +INSTALL-DEPS () { ##Install deps from array "$deps" +for t in ${deps[@]}; do + if [ $(dpkg-query -W -f='${Status}' $t 2>/dev/null | grep -c "ok installed") -eq 0 ]; + then + echo "Installing "$t""; + apt-get install $t -Y; + echo "Done."; + else + echo ""$t" already installed!" + + fi +done +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"" + git checkout $Iversion $tmp_path + + echo "" + + read -e -i "$VAR_PREFIX" -p "PREFIX (Install root directory): " input # Reads VAR_PREFIX + VAR_PREFIX="${input:-$VAR_PREFIX}" + + read -e -i "$VAR_PLUGINS" -p "PLUGINS (Plugin directory): " input # Reads VAR_PLUGINS + VAR_PLUGINS="${input:-$VAR_PLUGINS}" + + read -e -i "$VAR_DEFAULT_CFG" -p "Default config path: " input # Reads VAR_DEFAULT_CFG + VAR_DEFAULT_CFG="${input:-$VAR_DEFAULT_CFG}" + + read -e -i "$VAR_EXAMPLE_CFGS" -p "Example config directory: " input # Reads VAR_EXAMPLE_CFGS + VAR_EXAMPLE_CFGS="${input:-$VAR_EXAMPLE_CFGS}" + + + export PREFIX=$VAR_PREFIX + export PLUGINS=$VAR_PLUGINS + export DEFAULT_CFG=$VAR_DEFAULT_CFG + export DESTDIR=$VAR_DESTDIR + export EXAMPLES=$VAR_EXAMPLE_CFGS +} + +INSTALL-RUN () { # Build + cd "$tmp_path" + make clean + make $makeargs + make install +} + +ERROR () { + echo "Aborting..." + CLEAN + exit 1 +} + +DONE () { + echo Done. + CLEAN + exit 0 +} + +CLEAN () { + echo "Cleaning..." + rm -rf $tmp_path +} + +############################################## FUNCTIONS ############################################## + + +################################################ 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 [ $(wget -q --spider http://github.com) $? -eq 0 ]; then "INSTALL-DEPS"; else echo You need connection to the internet; ERROR ; fi + +INSTALL-PREP +echo "" +INSTALL-RUN +DONE \ No newline at end of file -- cgit v1.2.3 From 0e7645ddbd3dfa20ccc246c4aa50a3299fdb708e Mon Sep 17 00:00:00 2001 From: Spacelord Date: Fri, 6 Dec 2019 20:04:56 +0100 Subject: Change $makeargs to "all" --- installer.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'installer.sh') diff --git a/installer.sh b/installer.sh index fa898fb..bf2775c 100644 --- a/installer.sh +++ b/installer.sh @@ -8,7 +8,7 @@ script_path="`cd $0; pwd`" # Script dir tmp_path=$(mktemp -d) # Repo download path Iversion="v0.2" # (fallback version if ) -makeargs=full # Build args +makeargs=all # Build args VAR_DESTDIR="" # Unused VAR_PREFIX="/usr" @@ -25,7 +25,7 @@ for t in ${deps[@]}; do if [ $(dpkg-query -W -f='${Status}' $t 2>/dev/null | grep -c "ok installed") -eq 0 ]; then echo "Installing "$t""; - apt-get install $t -Y; + apt-get install $t -y; echo "Done."; else echo ""$t" already installed!" -- cgit v1.2.3 From 980e3d84c3da1be28d6e46d8f78ae1816961eb9d Mon Sep 17 00:00:00 2001 From: Spacelord Date: Fri, 6 Dec 2019 20:09:08 +0100 Subject: Remove ola from deps --- installer.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'installer.sh') diff --git a/installer.sh b/installer.sh index bf2775c..6d438a7 100644 --- a/installer.sh +++ b/installer.sh @@ -1,7 +1,7 @@ #!/bin/bash ################################################ SETUP ################################################ -deps=(libasound2-dev libevdev-dev liblua5.3-dev libola-dev libjack-jackd2-dev pkg-config libssl-dev gcc make wget git) +deps=(libasound2-dev libevdev-dev liblua5.3-dev libjack-jackd2-dev pkg-config libssl-dev gcc make wget git) user=$(whoami) # for bypassing user check replace "$(whoami)" with "root". script_path="`cd $0; pwd`" # Script dir @@ -25,7 +25,7 @@ for t in ${deps[@]}; do if [ $(dpkg-query -W -f='${Status}' $t 2>/dev/null | grep -c "ok installed") -eq 0 ]; then echo "Installing "$t""; - apt-get install $t -y; + apt-get install $t; echo "Done."; else echo ""$t" already installed!" -- cgit v1.2.3 From f8d34ee6a8de3fe64339a2d1cbce767cbee2e520 Mon Sep 17 00:00:00 2001 From: Spacelord Date: Fri, 6 Dec 2019 22:06:18 +0100 Subject: Fix git checkout error with git init --- installer.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'installer.sh') diff --git a/installer.sh b/installer.sh index 6d438a7..eab9f50 100644 --- a/installer.sh +++ b/installer.sh @@ -40,6 +40,7 @@ INSTALL-PREP () { 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"" + git init $tmp_path git checkout $Iversion $tmp_path echo "" -- cgit v1.2.3 From a04b0d13d9248f89b9fe71f9d433ad44aac99116 Mon Sep 17 00:00:00 2001 From: Spacelord Date: Fri, 6 Dec 2019 22:21:44 +0100 Subject: Added update to README --- installer.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 installer.sh (limited to 'installer.sh') diff --git a/installer.sh b/installer.sh old mode 100644 new mode 100755 -- cgit v1.2.3 From 2fb3801be65cd98a6069f503897da93033b5049e Mon Sep 17 00:00:00 2001 From: Spacelord Date: Sat, 7 Dec 2019 15:22:58 +0100 Subject: Convert user check to 1line --- installer.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'installer.sh') diff --git a/installer.sh b/installer.sh index eab9f50..1a6301c 100755 --- a/installer.sh +++ b/installer.sh @@ -97,10 +97,7 @@ CLEAN () { 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 -- cgit v1.2.3 From 95eac9cccb2cba39446f83e8803565f018fa411b Mon Sep 17 00:00:00 2001 From: Spacelord Date: Sat, 7 Dec 2019 16:36:09 +0100 Subject: Git checkout fix (again) --- installer.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'installer.sh') diff --git a/installer.sh b/installer.sh index 1a6301c..ae6518e 100755 --- a/installer.sh +++ b/installer.sh @@ -41,8 +41,10 @@ INSTALL-PREP () { Iversion=(git describe --abbrev=0) # Get last tag(stable version) echo "Starting Git checkout to "$Iversion"" git init $tmp_path - git checkout $Iversion $tmp_path - + ( + cd $tmp_path + git checkout $Iversion $tmp_path + ) echo "" read -e -i "$VAR_PREFIX" -p "PREFIX (Install root directory): " input # Reads VAR_PREFIX -- cgit v1.2.3 From 2e1c2f63ef728027ebb8183599a4ebba734c8a04 Mon Sep 17 00:00:00 2001 From: Spacelord Date: Sat, 7 Dec 2019 16:41:44 +0100 Subject: checkout fix again (bugfix) --- installer.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'installer.sh') diff --git a/installer.sh b/installer.sh index ae6518e..dab1afc 100755 --- a/installer.sh +++ b/installer.sh @@ -41,10 +41,7 @@ INSTALL-PREP () { Iversion=(git describe --abbrev=0) # Get last tag(stable version) echo "Starting Git checkout to "$Iversion"" git init $tmp_path - ( - cd $tmp_path - git checkout $Iversion $tmp_path - ) + (cd $tmp_path; git checkout $Iversion) echo "" read -e -i "$VAR_PREFIX" -p "PREFIX (Install root directory): " input # Reads VAR_PREFIX -- cgit v1.2.3 From c038fee6bd4888749691299456f8e95611677e43 Mon Sep 17 00:00:00 2001 From: Spacelord Date: Sat, 7 Dec 2019 17:40:35 +0100 Subject: git checkout bug fix.. --- installer.sh | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) (limited to 'installer.sh') diff --git a/installer.sh b/installer.sh index dab1afc..fc544f6 100755 --- a/installer.sh +++ b/installer.sh @@ -7,7 +7,7 @@ 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 ) +Iversion="TEST!" # (fallback version if ) makeargs=all # Build args VAR_DESTDIR="" # Unused @@ -38,10 +38,35 @@ 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"" + +( + echo "" + echo "" + cd $tmp_path + echo "IVer.: $Iversion" + + echo "Start GIT INIT" git init $tmp_path - (cd $tmp_path; git checkout $Iversion) + + echo "IVer.: $Iversion VOR GIT DESCRIBE!" + echo "" + + + echo "Starting git describe.." + Iversion=$(git describe --abbrev=0) # Get last tag(stable version) + echo "IVer.: $Iversion NACH GIT DESCRIBE!" + + echo "" + + + echo "Starting Git checkout to "$Iversion"" + git checkout $Iversion + ) + echo "" + echo "Done. (Iver.: $Iversion)" + + + echo "" read -e -i "$VAR_PREFIX" -p "PREFIX (Install root directory): " input # Reads VAR_PREFIX -- cgit v1.2.3 From 565c75ff0c0b828b370179e0b877d629503794e5 Mon Sep 17 00:00:00 2001 From: Spacelord Date: Sat, 7 Dec 2019 18:17:05 +0100 Subject: Finally git checkout bug with subshell fixed. --- installer.sh | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) (limited to 'installer.sh') diff --git a/installer.sh b/installer.sh index fc544f6..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="TEST!" # (fallback version if ) makeargs=all # Build args VAR_DESTDIR="" # Unused @@ -36,37 +35,24 @@ echo "" } INSTALL-PREP () { - echo "Starting Git!" - git clone https://github.com/cbdevnet/midimonster.git "$tmp_path" # Gets Midimonster - -( +(#### 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 - echo "IVer.: $Iversion" - - echo "Start GIT INIT" git init $tmp_path - - echo "IVer.: $Iversion VOR GIT DESCRIBE!" echo "" - - - echo "Starting git describe.." + echo "Finding latest stable version..." Iversion=$(git describe --abbrev=0) # Get last tag(stable version) - echo "IVer.: $Iversion NACH GIT DESCRIBE!" - - echo "" + echo "Starting Git checkout to "$Iversion"..." + git checkout -f -q $Iversion + echo "Done." + ) - - echo "Starting Git checkout to "$Iversion"" - git checkout $Iversion - ) echo "" - echo "Done. (Iver.: $Iversion)" - - - + echo "" echo "" read -e -i "$VAR_PREFIX" -p "PREFIX (Install root directory): " input # Reads VAR_PREFIX @@ -117,7 +103,6 @@ CLEAN () { ################################################ Main ################################################# - trap ERROR SIGINT SIGTERM SIGKILL clear -- cgit v1.2.3 From 5384f9ee0b4ff4a6aa72300436b7dd47b77dc84d Mon Sep 17 00:00:00 2001 From: Spacelord Date: Wed, 18 Dec 2019 19:53:28 +0100 Subject: Initial updater implementation --- installer.sh | 181 ++++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 142 insertions(+), 39 deletions(-) (limited to 'installer.sh') diff --git a/installer.sh b/installer.sh index fd4dd91..527904c 100755 --- a/installer.sh +++ b/installer.sh @@ -4,8 +4,11 @@ deps=(libasound2-dev libevdev-dev liblua5.3-dev libjack-jackd2-dev pkg-config libssl-dev gcc make wget git) user=$(whoami) # for bypassing user check replace "$(whoami)" with "root". -script_path="`cd $0; pwd`" # Script dir tmp_path=$(mktemp -d) # Repo download path +updater_dir=/etc/midimonster-updater-installer # Updater download + config path +updater_file=$updater_dir/updater.conf # + +latest_version=$(curl --silent "https://api.github.com/repos/cbdevnet/midimonster/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') makeargs=all # Build args @@ -15,6 +18,9 @@ VAR_PLUGINS="$VAR_PREFIX/lib/midimonster" VAR_DEFAULT_CFG="/etc/midimonster/midimonster.cfg" VAR_EXAMPLE_CFGS="$VAR_PREFIX/share/midimonster" +bold=$(tput bold) +normal=$(tput sgr0) + ################################################ SETUP ################################################ ############################################## FUNCTIONS ############################################## @@ -23,58 +29,127 @@ INSTALL-DEPS () { ##Install deps from array "$deps" for t in ${deps[@]}; do if [ $(dpkg-query -W -f='${Status}' $t 2>/dev/null | grep -c "ok installed") -eq 0 ]; then - echo "Installing "$t""; + printf "\nInstalling "$t""; apt-get install $t; - echo "Done."; + printf "\nDone."; else - echo ""$t" already installed!" - + printf "\n"$t" already installed!" fi done -echo "" +printf "\n" } INSTALL-PREP () { (#### Subshell make things like cd $tmp_path easier to revert - echo "Starting download..." + printf "\nStarting download..." git clone https://github.com/cbdevnet/midimonster.git "$tmp_path" # Gets Midimonster - echo "" - echo "" - echo "Initializing repository..." + printf "\n\n\nInitializing repository..." cd $tmp_path git init $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." - ) + printf "\n" + + read -p "Do you want to install the nightly version? (y/n)? " magic #Asks for nightly version + case "$magic" in + y|Y ) printf "\nOK! You´re a risky person ;D" + NIGHTLY=1 + ;; + n|N ) printf "\nThat´s ok I´ll install the latest stable version for you ;-)" + NIGHTLY=0 + ;; + * ) printf "\nInvalid input" + ERROR + ;; + esac + + if [ $NIGHTLY != 1 ]; then printf "\nFinding latest stable version..."; Iversion=$(git describe --abbrev=0); printf "\nStarting Git checkout to "$Iversion"..."; git checkout -f -q $Iversion; fi # Git checkout if NIGHTLY !=1 + printf "\nPreparing Done.\n\n\n" +) +printf "${bold}If you don't know what you're doing, just hit enter 4 times.${normal}\n" + +read -e -i "$VAR_PREFIX" -p "PREFIX (Install root directory): " input # Reads VAR_PREFIX +VAR_PREFIX="${input:-$VAR_PREFIX}" + +read -e -i "$VAR_PLUGINS" -p "PLUGINS (Plugin directory): " input # Reads VAR_PLUGINS +VAR_PLUGINS="${input:-$VAR_PLUGINS}" + +read -e -i "$VAR_DEFAULT_CFG" -p "Default config path: " input # Reads VAR_DEFAULT_CFG +VAR_DEFAULT_CFG="${input:-$VAR_DEFAULT_CFG}" + +read -e -i "$VAR_EXAMPLE_CFGS" -p "Example config directory: " input # Reads VAR_EXAMPLE_CFGS +VAR_EXAMPLE_CFGS="${input:-$VAR_EXAMPLE_CFGS}" + +UPDATER_SAVE + +export PREFIX=$VAR_PREFIX +export PLUGINS=$VAR_PLUGINS +export DEFAULT_CFG=$VAR_DEFAULT_CFG +export DESTDIR=$VAR_DESTDIR +export EXAMPLES=$VAR_EXAMPLE_CFGS +} + +UPDATER-PREP () { +(#### Subshell make things like cd $tmp_path easier to revert - echo "" - echo "" - echo "" - read -e -i "$VAR_PREFIX" -p "PREFIX (Install root directory): " input # Reads VAR_PREFIX - VAR_PREFIX="${input:-$VAR_PREFIX}" + printf "\nStarting download..." + git clone https://github.com/cbdevnet/midimonster.git "$tmp_path" # Gets Midimonster + printf "\n\n" + printf "\nInitializing repository..." + cd $tmp_path + git init $tmp_path + printf "\n" + + read -p "Do you want to install the nightly version? (y/n)? " magic #Asks for nightly version + case "$magic" in + y|Y ) printf "\nOK! You´re a risky person ;D" + NIGHTLY=1 + ;; + n|N ) printf "\nThat´s ok I´ll install the latest stable version for you ;-)" + NIGHTLY=0 + ;; + * ) printf "\nInvalid input" + ERROR + ;; + esac + + if [ $NIGHTLY != 1 ]; then printf "\nFinding latest stable version..."; Iversion=$(git describe --abbrev=0); printf "\nStarting Git checkout to "$Iversion"..."; git checkout -f -q $Iversion; fi # Git checkout if NIGHTLY !=1 + printf "\nDone.\n\n\n" + ) - read -e -i "$VAR_PLUGINS" -p "PLUGINS (Plugin directory): " input # Reads VAR_PLUGINS - VAR_PLUGINS="${input:-$VAR_PLUGINS}" - read -e -i "$VAR_DEFAULT_CFG" -p "Default config path: " input # Reads VAR_DEFAULT_CFG - VAR_DEFAULT_CFG="${input:-$VAR_DEFAULT_CFG}" +rm -f "$VAR_PREFIX/bin/midimonster" +rm -rf "$VAR_PLUGINS/" - read -e -i "$VAR_EXAMPLE_CFGS" -p "Example config directory: " input # Reads VAR_EXAMPLE_CFGS - VAR_EXAMPLE_CFGS="${input:-$VAR_EXAMPLE_CFGS}" +UPDATER_SAVE +export PREFIX=$VAR_PREFIX +export PLUGINS=$VAR_PLUGINS +export DEFAULT_CFG=$VAR_DEFAULT_CFG +export DESTDIR=$VAR_DESTDIR +export EXAMPLES=$VAR_EXAMPLE_CFGS - export PREFIX=$VAR_PREFIX - export PLUGINS=$VAR_PLUGINS - export DEFAULT_CFG=$VAR_DEFAULT_CFG - export DESTDIR=$VAR_DESTDIR - export EXAMPLES=$VAR_EXAMPLE_CFGS +printf "\nSucessfully imported Updater settings from $updater_file." } +UPDATER () { + installed_version="$(midimonster --version)" + #installed_version="MIDIMonster v0.3-40-gafed325" # FOR TESTING ONLY! (or bypassing updater version check) + if [[ "$installed_version" =~ "$latest_version" ]]; then + printf "\nNewest Version is already installed! ${bold}($installed_version)${normal}\n\n" + ERROR + else + printf "\nThe installed Version ${bold}´$installed_version´${normal} equals not the newest stable version ${bold}´$latest_version´${normal} ( Maybe you are running on nightly? )\n\n" + fi + + UPDATER-PREP + INSTALL-RUN + + printf "\nUpdating updater/installer script in $updater_dir" + wget "https://raw.githubusercontent.com/cbdevnet/midimonster/master/installer.sh" -O $updater_dir + chmod +x $updater_dir/installer.sh + DONE + } + INSTALL-RUN () { # Build cd "$tmp_path" make clean @@ -82,20 +157,33 @@ INSTALL-RUN () { # Build make install } +UPDATER_SAVE () { # Saves file for the auto updater in this script + rm -rf $updater_dir + printf "\nSaving updater to $updater_dir/installer.sh" + mkdir -p "$updater_dir" + wget https://raw.githubusercontent.com/cbdevnet/midimonster/master/installer.sh -O $updater_dir/installer.sh + printf "\nCreating symlink to updater/installer in /usr/bin/midimonster-updater-installer" + ln -s "$updater_dir/installer.sh" "/usr/bin/midimonster-updater-installer" + chmod +x "$updater_dir/installer.sh" + printf "\nExporting updater config to $updater_file" + printf "VAR_PREFIX=%s\nVAR_PLUGINS=%s\nVAR_DEFAULT_CFG=%s\nVAR_DESTDIR=%s\nVAR_EXAMPLE_CFGS=%s\n" "$VAR_PREFIX" "$VAR_PLUGINS" "$VAR_DEFAULT_CFG" "$VAR_DESTDIR" "$VAR_EXAMPLE_CFGS" > $updater_file +} + ERROR () { - echo "Aborting..." + printf "\nAborting..." CLEAN + printf "Exiting...\n\n\n" exit 1 } DONE () { - echo Done. + printf "\n\nDone." CLEAN exit 0 } CLEAN () { - echo "Cleaning..." + printf "\nCleaning...\n\n" rm -rf $tmp_path } @@ -106,11 +194,26 @@ CLEAN () { trap ERROR SIGINT SIGTERM SIGKILL clear -if [ $user != "root" ]; then echo "Installer must be run as root"; ERROR; fi # Check if $user = root! +if [ "$user" != "root" ]; then printf "\nInstaller must be run as root"; ERROR; fi # Check if $user = root! +if [ $(wget -q --spider http://github.com) $? -eq 1 ]; then printf "\nYou need connection to the internet"; ERROR; fi + +if [ -f $updater_file ] # Checks if updater config file exist and import it(overwrite default values!) +then + + printf "\nStarting updater...\n\n" + . $updater_file + + if [ -x "$VAR_PREFIX/bin/midimonster" ] # Check if binary $updater/bin/midimonster exist. If yes start updater else skip. + then + UPDATER + else + printf "\nMidimonster binary not found, skipping updater.\n" + fi -if [ $(wget -q --spider http://github.com) $? -eq 0 ]; then "INSTALL-DEPS"; else echo You need connection to the internet; ERROR ; fi +fi +INSTALL-DEPS INSTALL-PREP -echo "" +printf "\n" INSTALL-RUN DONE \ No newline at end of file -- cgit v1.2.3 From 704f256475ad52ab96e42f7b10ca407fac13d313 Mon Sep 17 00:00:00 2001 From: Spacelord Date: Wed, 18 Dec 2019 21:43:01 +0100 Subject: Mention updater in README + Updater Improvements --- installer.sh | 81 ++++++++++++++++++++++++++---------------------------------- 1 file changed, 35 insertions(+), 46 deletions(-) (limited to 'installer.sh') diff --git a/installer.sh b/installer.sh index 527904c..8906866 100755 --- a/installer.sh +++ b/installer.sh @@ -5,7 +5,7 @@ deps=(libasound2-dev libevdev-dev liblua5.3-dev libjack-jackd2-dev pkg-config li user=$(whoami) # for bypassing user check replace "$(whoami)" with "root". tmp_path=$(mktemp -d) # Repo download path -updater_dir=/etc/midimonster-updater-installer # Updater download + config path +updater_dir=/etc/midimonster-updater # Updater download + config path updater_file=$updater_dir/updater.conf # latest_version=$(curl --silent "https://api.github.com/repos/cbdevnet/midimonster/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') @@ -39,17 +39,9 @@ done printf "\n" } -INSTALL-PREP () { -(#### Subshell make things like cd $tmp_path easier to revert - printf "\nStarting download..." - git clone https://github.com/cbdevnet/midimonster.git "$tmp_path" # Gets Midimonster - printf "\n\n\nInitializing repository..." - cd $tmp_path - git init $tmp_path - printf "\n" - - read -p "Do you want to install the nightly version? (y/n)? " magic #Asks for nightly version - case "$magic" in +NIGHTLY_CHECK () { +read -p "Do you want to install the latest developement version? (y/n)? " magic #Asks for nightly version +case "$magic" in y|Y ) printf "\nOK! You´re a risky person ;D" NIGHTLY=1 ;; @@ -59,11 +51,29 @@ INSTALL-PREP () { * ) printf "\nInvalid input" ERROR ;; - esac +esac + +if [ $NIGHTLY != 1 ] # Git checkout if NIGHTLY !=1 +then + printf "\nFinding latest stable version..." + Iversion=$(git describe --abbrev=0) + printf "\nStarting Git checkout to "$Iversion"..." + git checkout -f -q $Iversion +fi +} - if [ $NIGHTLY != 1 ]; then printf "\nFinding latest stable version..."; Iversion=$(git describe --abbrev=0); printf "\nStarting Git checkout to "$Iversion"..."; git checkout -f -q $Iversion; fi # Git checkout if NIGHTLY !=1 - printf "\nPreparing Done.\n\n\n" +INSTALL-PREP () { +(#### Subshell make things like cd $tmp_path easier to revert + printf "\nStarting download..." + git clone https://github.com/cbdevnet/midimonster.git "$tmp_path" # Gets Midimonster + printf "\n\n\nInitializing repository...\n" + cd $tmp_path + git init $tmp_path + printf "\n" ) +NIGHTLY_CHECK +printf "\nPreparing Done.\n\n\n" + printf "${bold}If you don't know what you're doing, just hit enter 4 times.${normal}\n" read -e -i "$VAR_PREFIX" -p "PREFIX (Install root directory): " input # Reads VAR_PREFIX @@ -97,25 +107,10 @@ UPDATER-PREP () { printf "\nInitializing repository..." cd $tmp_path git init $tmp_path - printf "\n" - - read -p "Do you want to install the nightly version? (y/n)? " magic #Asks for nightly version - case "$magic" in - y|Y ) printf "\nOK! You´re a risky person ;D" - NIGHTLY=1 - ;; - n|N ) printf "\nThat´s ok I´ll install the latest stable version for you ;-)" - NIGHTLY=0 - ;; - * ) printf "\nInvalid input" - ERROR - ;; - esac - - if [ $NIGHTLY != 1 ]; then printf "\nFinding latest stable version..."; Iversion=$(git describe --abbrev=0); printf "\nStarting Git checkout to "$Iversion"..."; git checkout -f -q $Iversion; fi # Git checkout if NIGHTLY !=1 - printf "\nDone.\n\n\n" + printf "\nSucessfully imported Updater settings from $updater_file.\n\n\n" ) - +NIGHTLY_CHECK +printf "\nPreparing Done.\n\n\n" rm -f "$VAR_PREFIX/bin/midimonster" rm -rf "$VAR_PLUGINS/" @@ -127,26 +122,20 @@ export PLUGINS=$VAR_PLUGINS export DEFAULT_CFG=$VAR_DEFAULT_CFG export DESTDIR=$VAR_DESTDIR export EXAMPLES=$VAR_EXAMPLE_CFGS - -printf "\nSucessfully imported Updater settings from $updater_file." } UPDATER () { installed_version="$(midimonster --version)" - #installed_version="MIDIMonster v0.3-40-gafed325" # FOR TESTING ONLY! (or bypassing updater version check) + installed_version="MIDIMonster v0.3-40-gafed325" # FOR TESTING ONLY! (or bypassing updater version check) if [[ "$installed_version" =~ "$latest_version" ]]; then printf "\nNewest Version is already installed! ${bold}($installed_version)${normal}\n\n" ERROR else - printf "\nThe installed Version ${bold}´$installed_version´${normal} equals not the newest stable version ${bold}´$latest_version´${normal} ( Maybe you are running on nightly? )\n\n" + printf "\nThe installed Version ${bold}´$installed_version´${normal} equals not the newest stable version ${bold}´$latest_version´${normal} ( Maybe you are running a developement version? )\n\n" fi UPDATER-PREP INSTALL-RUN - - printf "\nUpdating updater/installer script in $updater_dir" - wget "https://raw.githubusercontent.com/cbdevnet/midimonster/master/installer.sh" -O $updater_dir - chmod +x $updater_dir/installer.sh DONE } @@ -159,12 +148,12 @@ INSTALL-RUN () { # Build UPDATER_SAVE () { # Saves file for the auto updater in this script rm -rf $updater_dir - printf "\nSaving updater to $updater_dir/installer.sh" + printf "\nSaving updater to $updater_dir/updater.sh" mkdir -p "$updater_dir" - wget https://raw.githubusercontent.com/cbdevnet/midimonster/master/installer.sh -O $updater_dir/installer.sh - printf "\nCreating symlink to updater/installer in /usr/bin/midimonster-updater-installer" - ln -s "$updater_dir/installer.sh" "/usr/bin/midimonster-updater-installer" - chmod +x "$updater_dir/installer.sh" + wget https://raw.githubusercontent.com/cbdevnet/midimonster/master/installer.sh -O $updater_dir/updater.sh + printf "\nCreating symlink to updater in /usr/bin/midimonster-updater" + ln -s "$updater_dir/updater.sh" "/usr/bin/midimonster-updater" + chmod +x "$updater_dir/updater.sh" printf "\nExporting updater config to $updater_file" printf "VAR_PREFIX=%s\nVAR_PLUGINS=%s\nVAR_DEFAULT_CFG=%s\nVAR_DESTDIR=%s\nVAR_EXAMPLE_CFGS=%s\n" "$VAR_PREFIX" "$VAR_PLUGINS" "$VAR_DEFAULT_CFG" "$VAR_DESTDIR" "$VAR_EXAMPLE_CFGS" > $updater_file } -- cgit v1.2.3 From 257d5f09fb704b165f22ece1695a6bd72a222f49 Mon Sep 17 00:00:00 2001 From: Spacelord Date: Wed, 18 Dec 2019 21:46:53 +0100 Subject: fix testing var --- installer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'installer.sh') diff --git a/installer.sh b/installer.sh index 8906866..d131234 100755 --- a/installer.sh +++ b/installer.sh @@ -126,7 +126,7 @@ export EXAMPLES=$VAR_EXAMPLE_CFGS UPDATER () { installed_version="$(midimonster --version)" - installed_version="MIDIMonster v0.3-40-gafed325" # FOR TESTING ONLY! (or bypassing updater version check) + #installed_version="MIDIMonster v0.3-40-gafed325" # FOR TESTING ONLY! (or bypassing updater version check) if [[ "$installed_version" =~ "$latest_version" ]]; then printf "\nNewest Version is already installed! ${bold}($installed_version)${normal}\n\n" ERROR -- cgit v1.2.3 From afe2f2a9cb809e4a28ae519db239fa0e4f136685 Mon Sep 17 00:00:00 2001 From: cbdev Date: Wed, 18 Dec 2019 22:47:57 +0100 Subject: Style fixes in installer --- installer.sh | 281 ++++++++++++++++++++++++++++++----------------------------- 1 file changed, 143 insertions(+), 138 deletions(-) (limited to 'installer.sh') diff --git a/installer.sh b/installer.sh index d131234..c17d847 100755 --- a/installer.sh +++ b/installer.sh @@ -6,7 +6,7 @@ user=$(whoami) # for bypassing user check replace "$(whoami)" w tmp_path=$(mktemp -d) # Repo download path updater_dir=/etc/midimonster-updater # Updater download + config path -updater_file=$updater_dir/updater.conf # +updater_file=$updater_dir/updater.conf latest_version=$(curl --silent "https://api.github.com/repos/cbdevnet/midimonster/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') @@ -26,154 +26,153 @@ normal=$(tput sgr0) ############################################## FUNCTIONS ############################################## INSTALL-DEPS () { ##Install deps from array "$deps" -for t in ${deps[@]}; do - if [ $(dpkg-query -W -f='${Status}' $t 2>/dev/null | grep -c "ok installed") -eq 0 ]; - then - printf "\nInstalling "$t""; - apt-get install $t; - printf "\nDone."; - else - printf "\n"$t" already installed!" - fi -done -printf "\n" + for t in ${deps[@]}; do + if [ $(dpkg-query -W -f='${Status}' $t 2>/dev/null | grep -c "ok installed") -eq 0 ]; then + printf "Installing %s\n" "$t" + apt-get install $t; + printf "Done\n"; + else + printf "%s already installed!\n" "$t" + fi + done + printf "\n" } NIGHTLY_CHECK () { -read -p "Do you want to install the latest developement version? (y/n)? " magic #Asks for nightly version -case "$magic" in - y|Y ) printf "\nOK! You´re a risky person ;D" - NIGHTLY=1 - ;; - n|N ) printf "\nThat´s ok I´ll install the latest stable version for you ;-)" - NIGHTLY=0 - ;; - * ) printf "\nInvalid input" - ERROR - ;; -esac - -if [ $NIGHTLY != 1 ] # Git checkout if NIGHTLY !=1 -then - printf "\nFinding latest stable version..." - Iversion=$(git describe --abbrev=0) - printf "\nStarting Git checkout to "$Iversion"..." - git checkout -f -q $Iversion -fi + #Asks for nightly version + read -p "Do you want to install the latest developement version? (y/n)? " magic + case "$magic" in + y|Y) + printf "OK! You´re a risky person ;D\n" + NIGHTLY=1 + ;; + n|N) + printf "That´s OK - installing the latest stable version for you ;-)\n" + NIGHTLY=0 + ;; + *) + printf "Invalid input\n" + ERROR + ;; + esac + + # Roll back to last tag if we're not on a nightly build + if [ "$NIGHTLY" != 1 ]; then + printf "Finding latest stable version...\n" + Iversion=$(git describe --abbrev=0) + printf "Starting Git checkout to %s...\n" "$Iversion" + git checkout -f -q $Iversion + fi } INSTALL-PREP () { -(#### Subshell make things like cd $tmp_path easier to revert - printf "\nStarting download..." - git clone https://github.com/cbdevnet/midimonster.git "$tmp_path" # Gets Midimonster - printf "\n\n\nInitializing repository...\n" - cd $tmp_path - git init $tmp_path - printf "\n" -) -NIGHTLY_CHECK -printf "\nPreparing Done.\n\n\n" - -printf "${bold}If you don't know what you're doing, just hit enter 4 times.${normal}\n" - -read -e -i "$VAR_PREFIX" -p "PREFIX (Install root directory): " input # Reads VAR_PREFIX -VAR_PREFIX="${input:-$VAR_PREFIX}" - -read -e -i "$VAR_PLUGINS" -p "PLUGINS (Plugin directory): " input # Reads VAR_PLUGINS -VAR_PLUGINS="${input:-$VAR_PLUGINS}" - -read -e -i "$VAR_DEFAULT_CFG" -p "Default config path: " input # Reads VAR_DEFAULT_CFG -VAR_DEFAULT_CFG="${input:-$VAR_DEFAULT_CFG}" - -read -e -i "$VAR_EXAMPLE_CFGS" -p "Example config directory: " input # Reads VAR_EXAMPLE_CFGS -VAR_EXAMPLE_CFGS="${input:-$VAR_EXAMPLE_CFGS}" - -UPDATER_SAVE - -export PREFIX=$VAR_PREFIX -export PLUGINS=$VAR_PLUGINS -export DEFAULT_CFG=$VAR_DEFAULT_CFG -export DESTDIR=$VAR_DESTDIR -export EXAMPLES=$VAR_EXAMPLE_CFGS + ( + printf "Starting download...\n" + git clone https://github.com/cbdevnet/midimonster.git "$tmp_path" # Gets Midimonster + printf "\nInitializing repository...\n" + cd $tmp_path + git init $tmp_path + printf "\n" + ) + NIGHTLY_CHECK + printf "Preparation successful\n\n" + printf "${bold}If you don't know what you're doing, just hit enter 4 times.${normal}\n" + + read -e -i "$VAR_PREFIX" -p "PREFIX (Install root directory): " input # Reads VAR_PREFIX + VAR_PREFIX="${input:-$VAR_PREFIX}" + + read -e -i "$VAR_PLUGINS" -p "PLUGINS (Plugin directory): " input # Reads VAR_PLUGINS + VAR_PLUGINS="${input:-$VAR_PLUGINS}" + + read -e -i "$VAR_DEFAULT_CFG" -p "Default config path: " input # Reads VAR_DEFAULT_CFG + VAR_DEFAULT_CFG="${input:-$VAR_DEFAULT_CFG}" + + read -e -i "$VAR_EXAMPLE_CFGS" -p "Example config directory: " input # Reads VAR_EXAMPLE_CFGS + VAR_EXAMPLE_CFGS="${input:-$VAR_EXAMPLE_CFGS}" + + UPDATER_SAVE + + export PREFIX=$VAR_PREFIX + export PLUGINS=$VAR_PLUGINS + export DEFAULT_CFG=$VAR_DEFAULT_CFG + export DESTDIR=$VAR_DESTDIR + export EXAMPLES=$VAR_EXAMPLE_CFGS } UPDATER-PREP () { -(#### Subshell make things like cd $tmp_path easier to revert - - - printf "\nStarting download..." - git clone https://github.com/cbdevnet/midimonster.git "$tmp_path" # Gets Midimonster - printf "\n\n" - printf "\nInitializing repository..." - cd $tmp_path - git init $tmp_path - printf "\nSucessfully imported Updater settings from $updater_file.\n\n\n" - ) -NIGHTLY_CHECK -printf "\nPreparing Done.\n\n\n" - -rm -f "$VAR_PREFIX/bin/midimonster" -rm -rf "$VAR_PLUGINS/" - -UPDATER_SAVE - -export PREFIX=$VAR_PREFIX -export PLUGINS=$VAR_PLUGINS -export DEFAULT_CFG=$VAR_DEFAULT_CFG -export DESTDIR=$VAR_DESTDIR -export EXAMPLES=$VAR_EXAMPLE_CFGS + ( + printf "Starting download...\n" + git clone https://github.com/cbdevnet/midimonster.git "$tmp_path" # Gets Midimonster + printf "\nInitializing repository...\n" + cd $tmp_path + git init $tmp_path + printf "Sucessfully imported settings from %s\n" "$updater_file" + ) + NIGHTLY_CHECK + printf "Preparation successful\n\n" + + rm -f "$VAR_PREFIX/bin/midimonster" + rm -rf "$VAR_PLUGINS/" + + UPDATER_SAVE + + export PREFIX=$VAR_PREFIX + export PLUGINS=$VAR_PLUGINS + export DEFAULT_CFG=$VAR_DEFAULT_CFG + export DESTDIR=$VAR_DESTDIR + export EXAMPLES=$VAR_EXAMPLE_CFGS } UPDATER () { - installed_version="$(midimonster --version)" - #installed_version="MIDIMonster v0.3-40-gafed325" # FOR TESTING ONLY! (or bypassing updater version check) - if [[ "$installed_version" =~ "$latest_version" ]]; then - printf "\nNewest Version is already installed! ${bold}($installed_version)${normal}\n\n" - ERROR - else - printf "\nThe installed Version ${bold}´$installed_version´${normal} equals not the newest stable version ${bold}´$latest_version´${normal} ( Maybe you are running a developement version? )\n\n" - fi - - UPDATER-PREP - INSTALL-RUN - DONE - } + installed_version="$(midimonster --version)" + #installed_version="MIDIMonster v0.3-40-gafed325" # FOR TESTING ONLY! (or bypassing updater version check) + if [[ "$installed_version" =~ "$latest_version" ]]; then + printf "Newest Version is already installed! ${bold}($installed_version)${normal}\n\n" + ERROR + else + printf "The installed Version ${bold}´$installed_version´${normal} equals not the newest stable version ${bold}´$latest_version´${normal} ( Maybe you are running a developement version? )\n\n" + fi + + UPDATER-PREP + INSTALL-RUN + DONE +} INSTALL-RUN () { # Build - cd "$tmp_path" - make clean - make $makeargs - make install + cd "$tmp_path" + make clean + make $makeargs + make install } UPDATER_SAVE () { # Saves file for the auto updater in this script - rm -rf $updater_dir - printf "\nSaving updater to $updater_dir/updater.sh" - mkdir -p "$updater_dir" - wget https://raw.githubusercontent.com/cbdevnet/midimonster/master/installer.sh -O $updater_dir/updater.sh - printf "\nCreating symlink to updater in /usr/bin/midimonster-updater" - ln -s "$updater_dir/updater.sh" "/usr/bin/midimonster-updater" - chmod +x "$updater_dir/updater.sh" - printf "\nExporting updater config to $updater_file" - printf "VAR_PREFIX=%s\nVAR_PLUGINS=%s\nVAR_DEFAULT_CFG=%s\nVAR_DESTDIR=%s\nVAR_EXAMPLE_CFGS=%s\n" "$VAR_PREFIX" "$VAR_PLUGINS" "$VAR_DEFAULT_CFG" "$VAR_DESTDIR" "$VAR_EXAMPLE_CFGS" > $updater_file + rm -rf $updater_dir + printf "Saving updater to %s/updater.sh\n" "$update_dir" + mkdir -p "$updater_dir" + wget https://raw.githubusercontent.com/cbdevnet/midimonster/master/installer.sh -O $updater_dir/updater.sh + printf "Creating symlink to updater in /usr/bin/midimonster-updater\n" + ln -s "$updater_dir/updater.sh" "/usr/bin/midimonster-updater\n" + chmod +x "$updater_dir/updater.sh" + printf "Exporting updater config to %s\n" "$updater_file" + printf "VAR_PREFIX=%s\nVAR_PLUGINS=%s\nVAR_DEFAULT_CFG=%s\nVAR_DESTDIR=%s\nVAR_EXAMPLE_CFGS=%s\n" "$VAR_PREFIX" "$VAR_PLUGINS" "$VAR_DEFAULT_CFG" "$VAR_DESTDIR" "$VAR_EXAMPLE_CFGS" > $updater_file } ERROR () { - printf "\nAborting..." - CLEAN - printf "Exiting...\n\n\n" - exit 1 + printf "\nAborting...\n" + CLEAN + printf "Exiting...\n" + exit 1 } DONE () { - printf "\n\nDone." - CLEAN - exit 0 + printf "\nDone.\n" + CLEAN + exit 0 } CLEAN () { - printf "\nCleaning...\n\n" - rm -rf $tmp_path + printf "\nCleaning...\n" + rm -rf $tmp_path } ############################################## FUNCTIONS ############################################## @@ -183,26 +182,32 @@ CLEAN () { trap ERROR SIGINT SIGTERM SIGKILL clear -if [ "$user" != "root" ]; then printf "\nInstaller must be run as root"; ERROR; fi # Check if $user = root! -if [ $(wget -q --spider http://github.com) $? -eq 1 ]; then printf "\nYou need connection to the internet"; ERROR; fi - -if [ -f $updater_file ] # Checks if updater config file exist and import it(overwrite default values!) -then - - printf "\nStarting updater...\n\n" - . $updater_file +# Check if $user = root! +if [ "$user" != "root" ]; then + printf "Installer must be run as root\n" + ERROR +fi - if [ -x "$VAR_PREFIX/bin/midimonster" ] # Check if binary $updater/bin/midimonster exist. If yes start updater else skip. - then - UPDATER - else - printf "\nMidimonster binary not found, skipping updater.\n" - fi +if [ $(wget -q --spider http://github.com) $? -eq 1 ]; then + printf "You need connection to the internet\n" + ERROR +fi +# Check if updater config file exist and import it (overwrites default values!) +if [ -f $updater_file ]; then + printf "Starting updater...\n\n" + . $updater_file + + # Check if binary $updater/bin/midimonster exist. If yes start updater else skip. + if [ -x "$VAR_PREFIX/bin/midimonster" ]; then + UPDATER + else + printf "midimonster binary not found, skipping updater.\n" + fi fi INSTALL-DEPS INSTALL-PREP printf "\n" INSTALL-RUN -DONE \ No newline at end of file +DONE -- cgit v1.2.3 From a25e815c4d5b4af5068ed3254be8e18c4c4fe7ab Mon Sep 17 00:00:00 2001 From: cbdev Date: Wed, 18 Dec 2019 23:26:13 +0100 Subject: Fix spelling --- installer.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'installer.sh') diff --git a/installer.sh b/installer.sh index c17d847..04207cb 100755 --- a/installer.sh +++ b/installer.sh @@ -40,7 +40,7 @@ INSTALL-DEPS () { ##Install deps from array "$deps" NIGHTLY_CHECK () { #Asks for nightly version - read -p "Do you want to install the latest developement version? (y/n)? " magic + read -p "Do you want to install the latest development version? (y/n)? " magic case "$magic" in y|Y) printf "OK! You´re a risky person ;D\n" @@ -130,7 +130,7 @@ UPDATER () { printf "Newest Version is already installed! ${bold}($installed_version)${normal}\n\n" ERROR else - printf "The installed Version ${bold}´$installed_version´${normal} equals not the newest stable version ${bold}´$latest_version´${normal} ( Maybe you are running a developement version? )\n\n" + printf "The installed Version ${bold}´$installed_version´${normal} equals not the newest stable version ${bold}´$latest_version´${normal} (Maybe you are running a development version?)\n\n" fi UPDATER-PREP -- cgit v1.2.3 From 5edccc6653eabe44079d82a7fbb96fd325b05177 Mon Sep 17 00:00:00 2001 From: cbdev Date: Thu, 19 Dec 2019 22:18:12 +0100 Subject: Fix installer symlink (Fixes #40) --- installer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'installer.sh') diff --git a/installer.sh b/installer.sh index 04207cb..c85b70e 100755 --- a/installer.sh +++ b/installer.sh @@ -151,7 +151,7 @@ UPDATER_SAVE () { # Saves file for the auto up mkdir -p "$updater_dir" wget https://raw.githubusercontent.com/cbdevnet/midimonster/master/installer.sh -O $updater_dir/updater.sh printf "Creating symlink to updater in /usr/bin/midimonster-updater\n" - ln -s "$updater_dir/updater.sh" "/usr/bin/midimonster-updater\n" + ln -s "$updater_dir/updater.sh" "/usr/bin/midimonster-updater" chmod +x "$updater_dir/updater.sh" printf "Exporting updater config to %s\n" "$updater_file" printf "VAR_PREFIX=%s\nVAR_PLUGINS=%s\nVAR_DEFAULT_CFG=%s\nVAR_DESTDIR=%s\nVAR_EXAMPLE_CFGS=%s\n" "$VAR_PREFIX" "$VAR_PLUGINS" "$VAR_DEFAULT_CFG" "$VAR_DESTDIR" "$VAR_EXAMPLE_CFGS" > $updater_file -- cgit v1.2.3 From 85fc921042efa68b0a34a413dd84bb1ea7a998cc Mon Sep 17 00:00:00 2001 From: cbdev Date: Sat, 28 Dec 2019 14:51:26 +0100 Subject: Check API pointer before use, fix spelling --- installer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'installer.sh') diff --git a/installer.sh b/installer.sh index c85b70e..15ad203 100755 --- a/installer.sh +++ b/installer.sh @@ -106,7 +106,7 @@ UPDATER-PREP () { printf "\nInitializing repository...\n" cd $tmp_path git init $tmp_path - printf "Sucessfully imported settings from %s\n" "$updater_file" + printf "Successfully imported settings from %s\n" "$updater_file" ) NIGHTLY_CHECK printf "Preparation successful\n\n" -- cgit v1.2.3