Files
2026-02-16 15:05:15 +01:00

47 lines
913 B
Bash

#! /bin/bash
PRODUCTNAME="Mountshares_Autostadt_ALL_DEU"
LOGFILE="/var/log/${PRODUCTNAME}.log"
exec >> $LOGFILE
exec 2>&1
echo $(DATE)" | ==== Start postinstall ===="
set -x
appPath="/Applications/Utilities"
appFile="Shares Verbinden.app"
destPath="${appPath}/${appFile}"
if [[ -e "${destPath}" ]]
then
rm -rf "${destPath}"
fi
tmpPath="/tmp"
tmpZipFile="Shares verbinden.zip"
tmpZipPath="${tmpPath}/${tmpZipFile}"
if [[ -e "${tmpZipPath}" ]]
then
rm -f "${tmpZipPath}"
fi
uudecode -o "${tmpZipPath}" << 'EOD'
EOD
RES=$(unzip -o "${tmpZipPath}" -d "${appPath}")
#rm -f "${tmpZipPath}"
chmod -R 755 "${destPath}"
#open "${destPath}"
#res=$(/usr/bin/osascript )
#echo $res
res=$(/usr/bin/osascript -e 'tell application "System Events" to make login item at end with properties {path:"/Applications/Utilities/Shares Verbinden.app", hidden:false}')
echo $res
echo $(DATE)" | ==== End postinstall ===="