Merge branch 'dev' into fragments

This commit is contained in:
Armin Briegel
2021-08-16 15:48:13 +02:00
7 changed files with 4189 additions and 283 deletions

View File

@@ -1,3 +1,8 @@
- Change in finding installed apps. We now look in /Applications and /Applications/Utilities first. If not found there, we use spotligt to find it. (We discovered a problem when a user has Parallels Windows installed with Microsoft Edge in it. Then Installomator wanted to update the app all the time, becaus spotligt found that Windows version of the app that Parallels created.)
- Added bunch of new labels
- Improved `buildCaseStatement.sh` a lot. It is a great start when figuring out how to create a new label for an app, or a piece of software.
- Mosyle changed their app name from Business to Self-Service
## v0.5 - 2021-04-13 ## v0.5 - 2021-04-13
- Major update and now with help from @Theile and @Isaac - Major update and now with help from @Theile and @Isaac

File diff suppressed because it is too large Load Diff

3638
Installomator.sh.orig Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,5 @@
1password7 1password7
4kvideodownloader
8x8 8x8
abstract abstract
adobebrackets adobebrackets
@@ -8,20 +9,32 @@ adobereaderdc-install
adobereaderdc-update adobereaderdc-update
aircall aircall
airserver airserver
aldente
alfred alfred
alttab
amazonchime amazonchime
amazonworkspaces amazonworkspaces
androidfiletransfer androidfiletransfer
anydesk
apparency apparency
appcleaner appcleaner
applenyfonts
applesfcompact
applesfmono
applesfpro
aquaskk aquaskk
arq7
atext
atom atom
audacity
autodmg autodmg
autopkgr autopkgr
aviatrix aviatrix
awscli2 awscli2
awsvpnclient awsvpnclient
balenaetcher balenaetcher
balsamiqwireframes
bartender
basecamp3 basecamp3
bbedit bbedit
bettertouchtool bettertouchtool
@@ -36,6 +49,7 @@ camostudio
camtasia camtasia
citrixworkspace citrixworkspace
clevershare2 clevershare2
clickshare
code42 code42
coderunner coderunner
cormorant cormorant
@@ -45,6 +59,7 @@ dangerzone
darktable darktable
dbeaverce dbeaverce
debookee debookee
defaultfolderx
depnotify depnotify
desktoppr desktoppr
detectxswift detectxswift
@@ -52,19 +67,24 @@ devonthink
dialpad dialpad
discord discord
docker docker
drift
dropbox dropbox
easeusdatarecoverywizard easeusdatarecoverywizard
egnyte egnyte
element element
eraseinstall eraseinstall
etrecheck etrecheck
evernote
exelbanstats exelbanstats
fantastical fantastical
favro
ferdi ferdi
figma figma
firefox firefox
firefox_da firefox_da
firefox_intl
firefoxesr firefoxesr
firefoxesr_intl
firefoxesrpkg firefoxesrpkg
firefoxpkg firefoxpkg
front front
@@ -79,20 +99,23 @@ googledrivebackupandsync
googledrivefilestream googledrivefilestream
googleearth googleearth
googlejapaneseinput googlejapaneseinput
googlesoftwareupdate
gotomeeting gotomeeting
gpgsuite gpgsuite
gpgsync gpgsync
grandperspective grandperspective
grasshopper
gyazo gyazo
gyazogif gyazogif
hancock
handbrake handbrake
hazel hazel
hpeasyadmin hpeasyadmin
hpeasystart hpeasystart
hyper hyper
icons icons
imazingprofileeditor
inkscape inkscape
installomator_st
installomator_theile installomator_theile
intellijideace intellijideace
istatmenus istatmenus
@@ -111,6 +134,7 @@ karabinerelements
keepassxc keepassxc
keka keka
keyboardmaestro keyboardmaestro
keyboardmaestro
klokki klokki
knockknock knockknock
krisp krisp
@@ -119,6 +143,7 @@ lastpass
launchbar launchbar
lexarrecoverytool lexarrecoverytool
libreoffice libreoffice
logitechoptions
loom loom
lucifer lucifer
lulu lulu
@@ -155,6 +180,7 @@ nomad
nomadlogin nomadlogin
notion notion
nvivo nvivo
obs
obsidian obsidian
odrive odrive
omnidisksweeper omnidisksweeper
@@ -180,6 +206,7 @@ prism9
privileges privileges
proctortrack proctortrack
promiseutilityr promiseutilityr
proxyman
pycharmce pycharmce
pymol pymol
r r
@@ -199,11 +226,13 @@ royaltsx
rstudio rstudio
santa santa
screamingfrogseospider screamingfrogseospider
screenflick
sfsymbols sfsymbols
shield shield
sidekick sidekick
signal signal
silnite silnite
sirimote
sizeup sizeup
sketch sketch
skype skype
@@ -218,24 +247,30 @@ sonoss2
sourcetree sourcetree
spotify spotify
sublimetext sublimetext
supportapp
suspiciouspackage suspiciouspackage
swiftruntimeforcommandlinetools swiftruntimeforcommandlinetools
tableaudesktop
tableaureader tableaureader
taskpaper taskpaper
teamviewer teamviewer
teamviewerhost teamviewerhost
teamviewerqs teamviewerqs
techsmithcapture
telegram telegram
textexpander
textmate textmate
theunarchiver
things things
thunderbird thunderbird
tigervnc tigervnc
toggltrack toggltrack
torbrowser torbrowser
trex
tunnelbear tunnelbear
tunnelblick tunnelblick
umbrellaroamingclient umbrellaroamingclient
universaltypeclient uniconverter
universaltypeclient universaltypeclient
vagrant vagrant
vanilla vanilla
@@ -247,18 +282,22 @@ vivaldi
vlc vlc
vmwarehorizonclient vmwarehorizonclient
vscodium vscodium
webex
webexmeetings webexmeetings
webexteams webexteams
whatsapp whatsapp
wickrme wickrme
wickrpro wickrpro
wireshark wireshark
wwdc
xeroxphaser7800 xeroxphaser7800
xink xink
xquartz
yubikeymanagerqt yubikeymanagerqt
zappy zappy
zoom zoom
zoomclient zoomclient
zoomrooms
zulujdk11 zulujdk11
zulujdk13 zulujdk13
zulujdk15 zulujdk15

View File

@@ -12,7 +12,7 @@ I have put a lot of work into making it stable and safe, but I cannot - of cours
## Support and Contributing ## Support and Contributing
Discussion, support and advice around Installomator happens in the `#installomator` channel in the [MacAdmins Slack](https:/macadmins.org). Go there for support questions. Discussion, support and advice around Installomator happens in the `#installomator` channel in the [MacAdmins.org Slack](https://macadmins.org). Go there for support questions.
Do not create an issue just when you have a questions, but do file an issue or pull request for bugs or wrong behavior. When in doubt, ask in the above Slack channel. Do not create an issue just when you have a questions, but do file an issue or pull request for bugs or wrong behavior. When in doubt, ask in the above Slack channel.

View File

@@ -10,66 +10,19 @@
export PATH=/usr/bin:/bin:/usr/sbin:/sbin export PATH=/usr/bin:/bin:/usr/sbin:/sbin
pkgname="Installomator" pkgname="Installomator"
version="0.5" version="0.6"
identifier="com.scriptingosx.${pkgname}" identifier="com.scriptingosx.${pkgname}"
install_location="/usr/local/Installomator/" install_location="/usr/local/Installomator/"
signature="Developer ID Installer: Armin Briegel (JME5BW3F3R)" signature="Developer ID Installer: Armin Briegel (JME5BW3F3R)"
dev_team="JME5BW3F3R" # asc-provider dev_team="JME5BW3F3R" # asc-provider
dev_account="developer@scriptingosx.com" dev_account="developer@scriptingosx.com"
dev_keychain_label="Developer-altool" dev_keychain_label="notary-scriptingosx"
scriptfolder=$(dirname "$0") scriptfolder=$(dirname "$0")
projectfolder=$(mktemp -d) projectfolder=$(mktemp -d)
payloadfolder="${projectfolder}/payload" payloadfolder="${projectfolder}/payload"
# MARK: functions
requeststatus() { # $1: requestUUID
requestUUID=${1?:"need a request UUID"}
req_status=$(xcrun altool --notarization-info "$requestUUID" \
--username "$dev_account" \
--password "@keychain:$dev_keychain_label" 2>&1 | awk -F ': ' '/Status:/ { print $2; }' )
echo "$req_status"
}
notarizefile() { # $1: path to file to notarize, $2: identifier
filepath=${1:?"need a filepath"}
identifier=${2:?"need an identifier"}
# upload file
echo "## uploading $filepath for notarization"
requestUUID=$(xcrun altool --notarize-app \
--primary-bundle-id "$identifier" \
--username "$dev_account" \
--password "@keychain:$dev_keychain_label" \
--asc-provider "$dev_team" \
--file "$filepath" 2>&1 | awk '/RequestUUID/ { print $NF; }')
echo "Notarization RequestUUID: $requestUUID"
if [[ $requestUUID == "" ]]; then
echo "could not upload for notarization"
exit 1
fi
# wait for status to be not "in progress" any more
request_status="in progress"
while [[ "$request_status" == "in progress" ]]; do
echo -n "waiting... "
sleep 10
request_status=$(requeststatus "$requestUUID")
echo "$request_status"
done
if [[ $request_status != "success" ]]; then
echo "## could not notarize $filepath"
xcrun altool --notarization-info "$requestUUID" \
--username "$dev_account" \
--password "@keychain:$dev_keychain_label"
exit 1
fi
}
# MARK: main code starts here # MARK: main code starts here
@@ -94,7 +47,6 @@ pkgbuild --root "${projectfolder}/payload" \
--install-location "${install_location}" \ --install-location "${install_location}" \
"${pkgpath}" "${pkgpath}"
# build the product archive # build the product archive
productpath="${scriptfolder}/${pkgname}-${version}.pkg" productpath="${scriptfolder}/${pkgname}-${version}.pkg"
@@ -108,8 +60,10 @@ productbuild --package "${pkgpath}" \
# clean up project folder # clean up project folder
rm -Rf "${projectfolder}" rm -Rf "${projectfolder}"
# NOTE: notarytool requires Xcode 13
# upload for notarization # upload for notarization
notarizefile "$productpath" "$identifier" xcrun notarytool submit "$productpath" --keychain-profile "$dev_keychain_label" --wait
# staple result # staple result
echo "## Stapling $productpath" echo "## Stapling $productpath"

View File

@@ -5,6 +5,10 @@ export PATH=/usr/bin:/bin:/usr/sbin:/sbin
downloadURL=${1?:"need to provide a download URL"} downloadURL=${1?:"need to provide a download URL"}
# Note: this tool _very_ experimental and does not work in many cases # Note: this tool _very_ experimental and does not work in many cases
# That being said, it's a great place to start for building up the label in the Case-statement
# Usage
# ./buildCaseStatement.sh <URL to download software>
# create temporary working directory # create temporary working directory
@@ -20,15 +24,7 @@ fi
# download the URL # download the URL
echo "Downloading $downloadURL" echo "Downloading $downloadURL"
<<<<<<< HEAD
<<<<<<< Updated upstream
if ! archivePath=$(curl -fsL "$downloadURL" --remote-header-name --remote-name -w "%{filename_effective}"); then
=======
if ! downloadOut="$(curl -fsL "$downloadURL" --remote-header-name --remote-name -w "%{filename_effective}\n%{url_effective}\n")"; then if ! downloadOut="$(curl -fsL "$downloadURL" --remote-header-name --remote-name -w "%{filename_effective}\n%{url_effective}\n")"; then
>>>>>>> Stashed changes
=======
if ! downloadOut="$(curl -fsL "$downloadURL" --remote-header-name --remote-name -w "%{filename_effective}\n%{url_effective}\n")"; then
>>>>>>> 4932ea6a3186d902d88c9bb5a3774c6ff81b1608
echo "error downloading $downloadURL" echo "error downloading $downloadURL"
exit 2 exit 2
fi fi
@@ -44,13 +40,6 @@ xpath() {
fi fi
} }
<<<<<<< HEAD
<<<<<<< Updated upstream
#archivePath=$(find $tmpDir -print )
echo "archivePath: $archivePath"
archiveName=${archivePath##*/}
echo "archiveName: $archiveName"
=======
pkgInvestigation() { pkgInvestigation() {
echo "Package found" echo "Package found"
teamID=$(spctl -a -vv -t install "$archiveName" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' ) teamID=$(spctl -a -vv -t install "$archiveName" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' )
@@ -81,39 +70,6 @@ echo "archivePath: $archivePath"
archiveName=${archivePath##*/} archiveName=${archivePath##*/}
echo "archiveName: $archiveName" echo "archiveName: $archiveName"
mv $archiveTempName $archiveName mv $archiveTempName $archiveName
>>>>>>> Stashed changes
=======
pkgInvestigation() {
echo "Package found"
teamID=$(spctl -a -vv -t install "$archiveName" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' )
echo "For PKGs it's advised to find packageID for version checking"
pkgutil --expand "$pkgPath" "$archiveName"_pkg
cat "$archiveName"_pkg/Distribution | xpath '//installer-gui-script/pkg-ref[@id][@version]' 2>/dev/null
packageID="$(cat "$archiveName"_pkg/Distribution | xpath '//installer-gui-script/pkg-ref[@id][@version]' 2>/dev/null | tr ' ' '\n' | grep -i "id" | cut -d \" -f 2)"
rm -r "$archiveName"_pkg
echo "$packageID"
echo "Above is the possible packageIDs that can be used, and the correct one is probably one of those with a version number. More investigation might be needed to figure out correct packageID if several are displayed."
}
appInvestigation() {
appName=${appPath##*/}
# verify with spctl
echo "Verifying: $appPath"
if ! teamID=$(spctl -a -vv "$appPath" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' ); then
echo "Error verifying $appPath"
exit 4
fi
}
echo "downloadOut: ${downloadOut}"
archiveTempName=$( echo "${downloadOut}" | head -1 )
echo "archiveTempName: $archiveTempName"
archivePath=$( echo "${downloadOut}" | tail -1 )
echo "archivePath: $archivePath"
archiveName=${archivePath##*/}
echo "archiveName: $archiveName"
mv $archiveTempName $archiveName
>>>>>>> 4932ea6a3186d902d88c9bb5a3774c6ff81b1608
name=${archiveName%.*} name=${archiveName%.*}
echo "name: $name" echo "name: $name"
archiveExt=${archiveName##*.} archiveExt=${archiveName##*.}
@@ -122,25 +78,8 @@ identifier=$(echo $name | tr '[:upper:]' '[:lower:]')
echo "identifier: $identifier" echo "identifier: $identifier"
if [ "$archiveExt" = "pkg" ]; then if [ "$archiveExt" = "pkg" ]; then
<<<<<<< HEAD
<<<<<<< Updated upstream
echo "Package found"
teamID=$(spctl -a -vv -t install "$archiveName" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' )
echo "For PKGs it's advised to find packageID for version checking"
pkgutil --expand "$archiveName" "$archiveName"_pkg
cat "$archiveName"_pkg/Distribution | xpath '//installer-gui-script/pkg-ref[@id][@version]' 2>/dev/null
packageID="$(cat "$archiveName"_pkg/Distribution | xpath '//installer-gui-script/pkg-ref[@id][@version]' 2>/dev/null | tr ' ' '\n' | grep -i "id" | cut -d \" -f 2)"
rm -r "$archiveName"_pkg
echo "$packageID"
echo "Above is the possible packageIDs that can be used, and the correct one is probably one of those with a version number. More investigation might be needed to figure out correct packageID if several are displayed."
=======
pkgPath="$archiveName" pkgPath="$archiveName"
pkgInvestigation pkgInvestigation
>>>>>>> Stashed changes
=======
pkgPath="$archiveName"
pkgInvestigation
>>>>>>> 4932ea6a3186d902d88c9bb5a3774c6ff81b1608
elif [ "$archiveExt" = "dmg" ]; then elif [ "$archiveExt" = "dmg" ]; then
echo "Diskimage found" echo "Diskimage found"
# mount the dmg # mount the dmg
@@ -182,15 +121,7 @@ elif [ "$archiveExt" = "zip" ] || [ "$archiveExt" = "tbz" ]; then
fi fi
echo echo
<<<<<<< HEAD
<<<<<<< Updated upstream
echo "appNewVersion is often difficult to find. Can sometimes be found in the filename, but also on a web page."
=======
echo "appNewVersion is often difficult to find. Can sometimes be found in the filename, but also on a web page. See archivePath above if link contains information about this." echo "appNewVersion is often difficult to find. Can sometimes be found in the filename, but also on a web page. See archivePath above if link contains information about this."
>>>>>>> Stashed changes
=======
echo "appNewVersion is often difficult to find. Can sometimes be found in the filename, but also on a web page. See archivePath above if link contains information about this."
>>>>>>> 4932ea6a3186d902d88c9bb5a3774c6ff81b1608
echo echo
echo "$identifier)" echo "$identifier)"
echo " name=\"$name\"" echo " name=\"$name\""