mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-08 05:31:53 +00:00
Labels
This commit is contained in:
@@ -52,6 +52,7 @@ cakebrew
|
||||
calibre
|
||||
camostudio
|
||||
camtasia
|
||||
cisdem-documentreader
|
||||
citrixworkspace
|
||||
clevershare2
|
||||
clickshare
|
||||
@@ -94,6 +95,7 @@ firefoxesr
|
||||
firefoxesr_intl
|
||||
firefoxesrpkg
|
||||
firefoxpkg
|
||||
flowjo
|
||||
front
|
||||
fsmonitor
|
||||
gimp
|
||||
@@ -125,6 +127,7 @@ imazingprofileeditor
|
||||
inkscape
|
||||
insomnia
|
||||
installomator_theile
|
||||
installprism9
|
||||
intellijideace
|
||||
istatmenus
|
||||
iterm2
|
||||
@@ -277,7 +280,6 @@ textmate
|
||||
theunarchiver
|
||||
things
|
||||
thunderbird
|
||||
tigervnc
|
||||
toggltrack
|
||||
torbrowser
|
||||
trex
|
||||
|
||||
7
fragments/labels/cisdem-documentreader.sh
Normal file
7
fragments/labels/cisdem-documentreader.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
cisdem-documentreader)
|
||||
name="cisdem-documentreader"
|
||||
type="dmg"
|
||||
downloadURL="https://download.cisdem.com/cisdem-documentreader.dmg"
|
||||
expectedTeamID="5HGV8EX6BQ"
|
||||
appName="Cisdem Document Reader.app"
|
||||
;;
|
||||
8
fragments/labels/flowjo.sh
Normal file
8
fragments/labels/flowjo.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
flowjo)
|
||||
name="FlowJo-OSX64-10.8.0"
|
||||
type="dmg"
|
||||
downloadURL="$(curl -fs "https://www.flowjo.com/solutions/flowjo/downloads" | grep -i -o -E "https.*\.dmg")"
|
||||
appNewVersion=$(echo "${downloadURL}" | tr "-" "\n" | grep dmg | sed -E 's/([0-9.]*)\.dmg/\1/g')
|
||||
expectedTeamID="C79HU5AD9V"
|
||||
appName="FlowJo.app"
|
||||
;;
|
||||
7
fragments/labels/installprism9.sh
Normal file
7
fragments/labels/installprism9.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
installprism9)
|
||||
name="InstallPrism9"
|
||||
type="dmg"
|
||||
downloadURL="https://cdn.graphpad.com/downloads/prism/9/InstallPrism9.dmg"
|
||||
expectedTeamID="YQ2D36NS9M"
|
||||
appName="Prism 9.app"
|
||||
;;
|
||||
@@ -121,84 +121,84 @@ for label in $allLabels; do
|
||||
|
||||
#caseLabel
|
||||
if cat "${pathToLabels}/${label}.sh" | grep -v -E '^[a-z0-9\_-]*(\)|\|\\)$' | grep -v ";;" > checkLabelCurrent.sh; then
|
||||
source checkLabelCurrent.sh
|
||||
source checkLabelCurrent.sh
|
||||
|
||||
echo "Name: $name"
|
||||
echo "Download URL: $downloadURL"
|
||||
echo "Type: $type"
|
||||
case $type in
|
||||
dmg|pkg|zip|tbz)
|
||||
expectedExtension="$type"
|
||||
;;
|
||||
pkgInDmg)
|
||||
expectedExtension="dmg"
|
||||
;;
|
||||
*InZip)
|
||||
expectedExtension="zip"
|
||||
;;
|
||||
*)
|
||||
echo "Cannot handle type $type"
|
||||
;;
|
||||
esac
|
||||
if [[ "$appNewVersion" == "" ]] ; then
|
||||
echo "No appNewVersion!"
|
||||
else
|
||||
if [[ $( echo "$appNewVersion" | grep -i "[0-9.]" ) == "" || $appNewVersion == "" ]]; then
|
||||
echo "${RED}-> !! ERROR in appNewVersion${NC}"
|
||||
labelError=1
|
||||
echo "Name: $name"
|
||||
echo "Download URL: $downloadURL"
|
||||
echo "Type: $type"
|
||||
case $type in
|
||||
dmg|pkg|zip|tbz)
|
||||
expectedExtension="$type"
|
||||
;;
|
||||
pkgInDmg)
|
||||
expectedExtension="dmg"
|
||||
;;
|
||||
*InZip)
|
||||
expectedExtension="zip"
|
||||
;;
|
||||
*)
|
||||
echo "Cannot handle type $type"
|
||||
;;
|
||||
esac
|
||||
if [[ "$appNewVersion" == "" ]] ; then
|
||||
echo "No appNewVersion!"
|
||||
else
|
||||
if [[ $appNewVersion != $( echo "$appNewVersion" | sed -E 's/[^0-9]*([0-9.]*)[^0-9]*/\1/g' ) ]]; then
|
||||
echo "${YELLOW}Warning: Version contain not only numbers and dots.${NC}"
|
||||
labelWarning=1
|
||||
if [[ $( echo "$appNewVersion" | grep -i "[0-9.]" ) == "" || $appNewVersion == "" ]]; then
|
||||
echo "${RED}-> !! ERROR in appNewVersion${NC}"
|
||||
labelError=1
|
||||
else
|
||||
if [[ $appNewVersion != $( echo "$appNewVersion" | sed -E 's/[^0-9]*([0-9.]*)[^0-9]*/\1/g' ) ]]; then
|
||||
echo "${YELLOW}Warning: Version contain not only numbers and dots.${NC}"
|
||||
labelWarning=1
|
||||
fi
|
||||
echo "Version: $appNewVersion" ;
|
||||
fi
|
||||
echo "Version: $appNewVersion" ;
|
||||
fi
|
||||
fi
|
||||
if curl -sfL --output /dev/null -r 0-0 "$downloadURL" ; then
|
||||
echo "${GREEN}OK: downloadURL works OK${NC}"
|
||||
if [[ $(echo "$downloadURL" | sed -E 's/.*\.([a-zA-Z]*)\s*/\1/g' ) == "${expectedExtension}" ]]; then
|
||||
echo "${GREEN}OK: download extension MATCH on ${expectedExtension}${NC}"
|
||||
else
|
||||
if [[ $(echo "$downloadURL" | grep -io "github.com") != "github.com" ]]; then
|
||||
URLheader=$( curl -fsIL "$downloadURL" )
|
||||
if [[ "${URLheader}" != "" ]]; then
|
||||
URLlocation=$( echo "${URLheader}" | grep -i "^location" )
|
||||
URLfilename=$( echo "${URLheader}" | grep -i "filename=" )
|
||||
if [[ "${URLlocation}" != "" ]]; then
|
||||
URLextension=$( echo "${URLlocation}" | tail -1 | sed -E 's/.*\.([a-zA-Z]*)\s*/\1/g' | tr -d '\r\n' )
|
||||
if curl -sfL --output /dev/null -r 0-0 "$downloadURL" ; then
|
||||
echo "${GREEN}OK: downloadURL works OK${NC}"
|
||||
if [[ $(echo "$downloadURL" | sed -E 's/.*\.([a-zA-Z]*)\s*/\1/g' ) == "${expectedExtension}" ]]; then
|
||||
echo "${GREEN}OK: download extension MATCH on ${expectedExtension}${NC}"
|
||||
else
|
||||
if [[ $(echo "$downloadURL" | grep -io "github.com") != "github.com" ]]; then
|
||||
URLheader=$( curl -fsIL "$downloadURL" )
|
||||
if [[ "${URLheader}" != "" ]]; then
|
||||
URLlocation=$( echo "${URLheader}" | grep -i "^location" )
|
||||
URLfilename=$( echo "${URLheader}" | grep -i "filename=" )
|
||||
if [[ "${URLlocation}" != "" ]]; then
|
||||
URLextension=$( echo "${URLlocation}" | tail -1 | sed -E 's/.*\.([a-zA-Z]*)\s*/\1/g' | tr -d '\r\n' )
|
||||
else
|
||||
URLextension=$( echo "${URLfilename}" | tail -1 | sed -E 's/.*\.([a-zA-Z]*)\s*/\1/g' | tr -d '\r\n' )
|
||||
fi
|
||||
URLextension=${URLextension:l}
|
||||
if [[ "${URLextension}" == "${expectedExtension}" ]]; then
|
||||
echo "${GREEN}OK: download extension MATCH on ${URLextension}${NC}"
|
||||
else
|
||||
echo "${RED}-> !! ERROR in download extension, expected ${expectedExtension}, but got ${URLextension}.${NC}"
|
||||
labelError=1
|
||||
fi
|
||||
else
|
||||
URLextension=$( echo "${URLfilename}" | tail -1 | sed -E 's/.*\.([a-zA-Z]*)\s*/\1/g' | tr -d '\r\n' )
|
||||
echo "no header provided from server."
|
||||
fi
|
||||
URLextension=${URLextension:l}
|
||||
if [[ "${URLextension}" == "${expectedExtension}" ]]; then
|
||||
echo "${GREEN}OK: download extension MATCH on ${URLextension}${NC}"
|
||||
else
|
||||
githubPart="$(echo "$downloadURL" | cut -d "/" -f4-6)"
|
||||
if [[ "$(curl -fsL "$downloadURL" | grep -io "${githubPart}.*\.${expectedExtension}")" != "" ]]; then
|
||||
echo "${GREEN}OK: download extension MATCH on ${expectedExtension}${NC}"
|
||||
else
|
||||
echo "${RED}-> !! ERROR in download extension, expected ${expectedExtension}, but got ${URLextension}.${NC}"
|
||||
echo "${RED}-> !! ERROR in download extension, expected ${expectedExtension}, but it was wrong${NC}"
|
||||
labelError=1
|
||||
fi
|
||||
else
|
||||
echo "no header provided from server."
|
||||
fi
|
||||
else
|
||||
githubPart="$(echo "$downloadURL" | cut -d "/" -f4-6)"
|
||||
if [[ "$(curl -fsL "$downloadURL" | grep -io "${githubPart}.*\.${expectedExtension}")" != "" ]]; then
|
||||
echo "${GREEN}OK: download extension MATCH on ${expectedExtension}${NC}"
|
||||
else
|
||||
echo "${RED}-> !! ERROR in download extension, expected ${expectedExtension}, but it was wrong${NC}"
|
||||
labelError=1
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "${RED}-> !! ERROR in downloadURL${NC}"
|
||||
labelError=1
|
||||
fi
|
||||
else
|
||||
echo "${RED}-> !! ERROR in downloadURL${NC}"
|
||||
labelError=1
|
||||
fi
|
||||
if [[ $labelWarning != 0 ]]; then; echo "${YELLOW}########## Warning in label: $label${NC}"; ((countWarning++)); fi
|
||||
if [[ $labelError != 0 ]]; then; echo "${RED}########## ERROR in label: $label${NC}"; ((countError++)); fi
|
||||
if [[ $labelWarning != 0 ]]; then; echo "${YELLOW}########## Warning in label: $label${NC}"; ((countWarning++)); fi
|
||||
if [[ $labelError != 0 ]]; then; echo "${RED}########## ERROR in label: $label${NC}"; ((countError++)); fi
|
||||
|
||||
if (($archLabels[(Ie)$label])); then
|
||||
secondRoundLabels+=( "$label" )
|
||||
fi
|
||||
if (($archLabels[(Ie)$label])); then
|
||||
secondRoundLabels+=( "$label" )
|
||||
fi
|
||||
else
|
||||
echo "Label: ${label} is not it's own file in Labels-folder. Skipping"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user