mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-08 05:31:53 +00:00
Merge branch 'dev' into fragments
This commit is contained in:
@@ -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
|
||||
|
||||
- Major update and now with help from @Theile and @Isaac
|
||||
|
||||
651
Installomator.sh
651
Installomator.sh
File diff suppressed because it is too large
Load Diff
3638
Installomator.sh.orig
Executable file
3638
Installomator.sh.orig
Executable file
File diff suppressed because it is too large
Load Diff
43
Labels.txt
43
Labels.txt
@@ -1,4 +1,5 @@
|
||||
1password7
|
||||
4kvideodownloader
|
||||
8x8
|
||||
abstract
|
||||
adobebrackets
|
||||
@@ -8,20 +9,32 @@ adobereaderdc-install
|
||||
adobereaderdc-update
|
||||
aircall
|
||||
airserver
|
||||
aldente
|
||||
alfred
|
||||
alttab
|
||||
amazonchime
|
||||
amazonworkspaces
|
||||
androidfiletransfer
|
||||
anydesk
|
||||
apparency
|
||||
appcleaner
|
||||
applenyfonts
|
||||
applesfcompact
|
||||
applesfmono
|
||||
applesfpro
|
||||
aquaskk
|
||||
arq7
|
||||
atext
|
||||
atom
|
||||
audacity
|
||||
autodmg
|
||||
autopkgr
|
||||
aviatrix
|
||||
awscli2
|
||||
awsvpnclient
|
||||
balenaetcher
|
||||
balsamiqwireframes
|
||||
bartender
|
||||
basecamp3
|
||||
bbedit
|
||||
bettertouchtool
|
||||
@@ -36,6 +49,7 @@ camostudio
|
||||
camtasia
|
||||
citrixworkspace
|
||||
clevershare2
|
||||
clickshare
|
||||
code42
|
||||
coderunner
|
||||
cormorant
|
||||
@@ -45,6 +59,7 @@ dangerzone
|
||||
darktable
|
||||
dbeaverce
|
||||
debookee
|
||||
defaultfolderx
|
||||
depnotify
|
||||
desktoppr
|
||||
detectxswift
|
||||
@@ -52,19 +67,24 @@ devonthink
|
||||
dialpad
|
||||
discord
|
||||
docker
|
||||
drift
|
||||
dropbox
|
||||
easeusdatarecoverywizard
|
||||
egnyte
|
||||
element
|
||||
eraseinstall
|
||||
etrecheck
|
||||
evernote
|
||||
exelbanstats
|
||||
fantastical
|
||||
favro
|
||||
ferdi
|
||||
figma
|
||||
firefox
|
||||
firefox_da
|
||||
firefox_intl
|
||||
firefoxesr
|
||||
firefoxesr_intl
|
||||
firefoxesrpkg
|
||||
firefoxpkg
|
||||
front
|
||||
@@ -79,20 +99,23 @@ googledrivebackupandsync
|
||||
googledrivefilestream
|
||||
googleearth
|
||||
googlejapaneseinput
|
||||
googlesoftwareupdate
|
||||
gotomeeting
|
||||
gpgsuite
|
||||
gpgsync
|
||||
grandperspective
|
||||
grasshopper
|
||||
gyazo
|
||||
gyazogif
|
||||
hancock
|
||||
handbrake
|
||||
hazel
|
||||
hpeasyadmin
|
||||
hpeasystart
|
||||
hyper
|
||||
icons
|
||||
imazingprofileeditor
|
||||
inkscape
|
||||
installomator_st
|
||||
installomator_theile
|
||||
intellijideace
|
||||
istatmenus
|
||||
@@ -111,6 +134,7 @@ karabinerelements
|
||||
keepassxc
|
||||
keka
|
||||
keyboardmaestro
|
||||
keyboardmaestro
|
||||
klokki
|
||||
knockknock
|
||||
krisp
|
||||
@@ -119,6 +143,7 @@ lastpass
|
||||
launchbar
|
||||
lexarrecoverytool
|
||||
libreoffice
|
||||
logitechoptions
|
||||
loom
|
||||
lucifer
|
||||
lulu
|
||||
@@ -155,6 +180,7 @@ nomad
|
||||
nomadlogin
|
||||
notion
|
||||
nvivo
|
||||
obs
|
||||
obsidian
|
||||
odrive
|
||||
omnidisksweeper
|
||||
@@ -180,6 +206,7 @@ prism9
|
||||
privileges
|
||||
proctortrack
|
||||
promiseutilityr
|
||||
proxyman
|
||||
pycharmce
|
||||
pymol
|
||||
r
|
||||
@@ -199,11 +226,13 @@ royaltsx
|
||||
rstudio
|
||||
santa
|
||||
screamingfrogseospider
|
||||
screenflick
|
||||
sfsymbols
|
||||
shield
|
||||
sidekick
|
||||
signal
|
||||
silnite
|
||||
sirimote
|
||||
sizeup
|
||||
sketch
|
||||
skype
|
||||
@@ -218,24 +247,30 @@ sonoss2
|
||||
sourcetree
|
||||
spotify
|
||||
sublimetext
|
||||
supportapp
|
||||
suspiciouspackage
|
||||
swiftruntimeforcommandlinetools
|
||||
tableaudesktop
|
||||
tableaureader
|
||||
taskpaper
|
||||
teamviewer
|
||||
teamviewerhost
|
||||
teamviewerqs
|
||||
techsmithcapture
|
||||
telegram
|
||||
textexpander
|
||||
textmate
|
||||
theunarchiver
|
||||
things
|
||||
thunderbird
|
||||
tigervnc
|
||||
toggltrack
|
||||
torbrowser
|
||||
trex
|
||||
tunnelbear
|
||||
tunnelblick
|
||||
umbrellaroamingclient
|
||||
universaltypeclient
|
||||
uniconverter
|
||||
universaltypeclient
|
||||
vagrant
|
||||
vanilla
|
||||
@@ -247,18 +282,22 @@ vivaldi
|
||||
vlc
|
||||
vmwarehorizonclient
|
||||
vscodium
|
||||
webex
|
||||
webexmeetings
|
||||
webexteams
|
||||
whatsapp
|
||||
wickrme
|
||||
wickrpro
|
||||
wireshark
|
||||
wwdc
|
||||
xeroxphaser7800
|
||||
xink
|
||||
xquartz
|
||||
yubikeymanagerqt
|
||||
zappy
|
||||
zoom
|
||||
zoomclient
|
||||
zoomrooms
|
||||
zulujdk11
|
||||
zulujdk13
|
||||
zulujdk15
|
||||
|
||||
@@ -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
|
||||
|
||||
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.
|
||||
|
||||
|
||||
@@ -10,66 +10,19 @@
|
||||
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
||||
|
||||
pkgname="Installomator"
|
||||
version="0.5"
|
||||
version="0.6"
|
||||
identifier="com.scriptingosx.${pkgname}"
|
||||
install_location="/usr/local/Installomator/"
|
||||
signature="Developer ID Installer: Armin Briegel (JME5BW3F3R)"
|
||||
dev_team="JME5BW3F3R" # asc-provider
|
||||
dev_account="developer@scriptingosx.com"
|
||||
dev_keychain_label="Developer-altool"
|
||||
dev_keychain_label="notary-scriptingosx"
|
||||
|
||||
|
||||
scriptfolder=$(dirname "$0")
|
||||
projectfolder=$(mktemp -d)
|
||||
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
|
||||
|
||||
@@ -94,7 +47,6 @@ pkgbuild --root "${projectfolder}/payload" \
|
||||
--install-location "${install_location}" \
|
||||
"${pkgpath}"
|
||||
|
||||
|
||||
# build the product archive
|
||||
|
||||
productpath="${scriptfolder}/${pkgname}-${version}.pkg"
|
||||
@@ -108,8 +60,10 @@ productbuild --package "${pkgpath}" \
|
||||
# clean up project folder
|
||||
rm -Rf "${projectfolder}"
|
||||
|
||||
# NOTE: notarytool requires Xcode 13
|
||||
|
||||
# upload for notarization
|
||||
notarizefile "$productpath" "$identifier"
|
||||
xcrun notarytool submit "$productpath" --keychain-profile "$dev_keychain_label" --wait
|
||||
|
||||
# staple result
|
||||
echo "## Stapling $productpath"
|
||||
|
||||
@@ -5,6 +5,10 @@ export PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
||||
downloadURL=${1?:"need to provide a download URL"}
|
||||
|
||||
# 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
|
||||
@@ -20,15 +24,7 @@ fi
|
||||
|
||||
# download the URL
|
||||
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
|
||||
>>>>>>> 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"
|
||||
exit 2
|
||||
fi
|
||||
@@ -44,13 +40,6 @@ xpath() {
|
||||
fi
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< Updated upstream
|
||||
#archivePath=$(find $tmpDir -print )
|
||||
echo "archivePath: $archivePath"
|
||||
archiveName=${archivePath##*/}
|
||||
echo "archiveName: $archiveName"
|
||||
=======
|
||||
pkgInvestigation() {
|
||||
echo "Package found"
|
||||
teamID=$(spctl -a -vv -t install "$archiveName" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' )
|
||||
@@ -81,39 +70,6 @@ echo "archivePath: $archivePath"
|
||||
archiveName=${archivePath##*/}
|
||||
echo "archiveName: $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%.*}
|
||||
echo "name: $name"
|
||||
archiveExt=${archiveName##*.}
|
||||
@@ -122,25 +78,8 @@ identifier=$(echo $name | tr '[:upper:]' '[:lower:]')
|
||||
echo "identifier: $identifier"
|
||||
|
||||
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"
|
||||
pkgInvestigation
|
||||
>>>>>>> Stashed changes
|
||||
=======
|
||||
pkgPath="$archiveName"
|
||||
pkgInvestigation
|
||||
>>>>>>> 4932ea6a3186d902d88c9bb5a3774c6ff81b1608
|
||||
elif [ "$archiveExt" = "dmg" ]; then
|
||||
echo "Diskimage found"
|
||||
# mount the dmg
|
||||
@@ -182,15 +121,7 @@ elif [ "$archiveExt" = "zip" ] || [ "$archiveExt" = "tbz" ]; then
|
||||
fi
|
||||
|
||||
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."
|
||||
>>>>>>> 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 "$identifier)"
|
||||
echo " name=\"$name\""
|
||||
|
||||
Reference in New Issue
Block a user