From c500cb39ec114c2903b3ed09b518fe00bb1b8eb6 Mon Sep 17 00:00:00 2001 From: Florian Wolpert Date: Mon, 6 Apr 2020 13:39:52 +0200 Subject: [PATCH] Also try to untar the uncompressed version of the archive Sometimes the download ist automatically decompressed. In this case the script should try to untar the plain tar archive or else exit with an error. --- script.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script.sh b/script.sh index 4781c2f..9d72787 100644 --- a/script.sh +++ b/script.sh @@ -1,7 +1,9 @@ #!/bin/sh set - mkdir -p Contents/Resources/IPMIView/Contents/Home/bin -tar -zxvf ~/Downloads/IPMIView*.tar.gz --strip=1 -C ./Contents/Resources/IPMIView/. +tar -zxvf ~/Downloads/IPMIView*.tar.gz --strip=1 -C ./Contents/Resources/IPMIView/. || + tar -xvf ~/Downloads/IPMIView*.tar --strip=1 -C ./Contents/Resources/IPMIView/. || + { echo "Something went wrong, check download of IPMIView archive" && exit 1; } ln -s /usr/bin/java Contents/Resources/IPMIView/Contents/Home/bin/java cd .. rsync -arv --exclude=.git --exclude=Contents/Resources/IPMIView/jre IPMIView.app ~/Applications