34 lines
1.2 KiB
Bash
Executable File
34 lines
1.2 KiB
Bash
Executable File
#!/bin/zsh
|
|
#########################################################################################
|
|
# Shellscript : install Postman
|
|
# Autor : Andreas Vogel, nextenterprise gmbh
|
|
#########################################################################################
|
|
#set -x
|
|
######################### Variale #######################################################
|
|
zipfile="Postman.zip"
|
|
url="https://dl.pstmn.io/download/latest/osx"
|
|
|
|
######################### Check if VS is installed ######################################
|
|
if /usr/bin/curl --location -s -o /tmp/$zipfile $url
|
|
then
|
|
if [ -d "/Applications/Postman.app" ]
|
|
then
|
|
echo "app found clear up"
|
|
osascript -e 'quit app "Code"'
|
|
rm -rf /Applications/Postman.app
|
|
sleep 3
|
|
unzip -o /tmp/${zipfile} -d /Applications
|
|
rm -f /tmp/${zipfile}
|
|
chmod -R 755 /Applications/Postman.app
|
|
chown -R root:wheel /Applications/Postman.app
|
|
else
|
|
echo "app ist not installed"
|
|
unzip -o /tmp/${zipfile} -d /Applications
|
|
rm -f /tmp/${zipfile}
|
|
chmod -R 755 /Applications/Postman.app
|
|
chown -R root:wheel /Applications/Postman.app
|
|
fi
|
|
else
|
|
exit 1
|
|
fi
|