aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSpacelord <Spacelord09@users.noreply.github.com>2019-12-07 18:17:05 +0100
committerSpacelord <Spacelord09@users.noreply.github.com>2019-12-07 18:17:05 +0100
commit565c75ff0c0b828b370179e0b877d629503794e5 (patch)
treec9dd26c12041250d3d9fc3a9288745a6a9551f2c
parentc038fee6bd4888749691299456f8e95611677e43 (diff)
downloadmidimonster-565c75ff0c0b828b370179e0b877d629503794e5.tar.gz
midimonster-565c75ff0c0b828b370179e0b877d629503794e5.tar.bz2
midimonster-565c75ff0c0b828b370179e0b877d629503794e5.zip
Finally git checkout bug with subshell fixed.
-rwxr-xr-xinstaller.sh35
1 files changed, 10 insertions, 25 deletions
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