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.
This commit is contained in:
Florian Wolpert
2020-04-06 13:39:52 +02:00
committed by GitHub
parent 6adb18bbf0
commit c500cb39ec

View File

@@ -1,7 +1,9 @@
#!/bin/sh #!/bin/sh
set - set -
mkdir -p Contents/Resources/IPMIView/Contents/Home/bin 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 ln -s /usr/bin/java Contents/Resources/IPMIView/Contents/Home/bin/java
cd .. cd ..
rsync -arv --exclude=.git --exclude=Contents/Resources/IPMIView/jre IPMIView.app ~/Applications rsync -arv --exclude=.git --exclude=Contents/Resources/IPMIView/jre IPMIView.app ~/Applications