This commit is contained in:
Søren Theilgaard
2021-08-27 14:30:00 +02:00
parent d69a102334
commit 409c84b7ef
5 changed files with 90 additions and 66 deletions

View File

@@ -52,6 +52,7 @@ cakebrew
calibre calibre
camostudio camostudio
camtasia camtasia
cisdem-documentreader
citrixworkspace citrixworkspace
clevershare2 clevershare2
clickshare clickshare
@@ -94,6 +95,7 @@ firefoxesr
firefoxesr_intl firefoxesr_intl
firefoxesrpkg firefoxesrpkg
firefoxpkg firefoxpkg
flowjo
front front
fsmonitor fsmonitor
gimp gimp
@@ -125,6 +127,7 @@ imazingprofileeditor
inkscape inkscape
insomnia insomnia
installomator_theile installomator_theile
installprism9
intellijideace intellijideace
istatmenus istatmenus
iterm2 iterm2
@@ -277,7 +280,6 @@ textmate
theunarchiver theunarchiver
things things
thunderbird thunderbird
tigervnc
toggltrack toggltrack
torbrowser torbrowser
trex trex

View 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"
;;

View 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"
;;

View 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"
;;

View File

@@ -121,84 +121,84 @@ for label in $allLabels; do
#caseLabel #caseLabel
if cat "${pathToLabels}/${label}.sh" | grep -v -E '^[a-z0-9\_-]*(\)|\|\\)$' | grep -v ";;" > checkLabelCurrent.sh; then 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 "Name: $name"
echo "Download URL: $downloadURL" echo "Download URL: $downloadURL"
echo "Type: $type" echo "Type: $type"
case $type in case $type in
dmg|pkg|zip|tbz) dmg|pkg|zip|tbz)
expectedExtension="$type" expectedExtension="$type"
;; ;;
pkgInDmg) pkgInDmg)
expectedExtension="dmg" expectedExtension="dmg"
;; ;;
*InZip) *InZip)
expectedExtension="zip" expectedExtension="zip"
;; ;;
*) *)
echo "Cannot handle type $type" echo "Cannot handle type $type"
;; ;;
esac esac
if [[ "$appNewVersion" == "" ]] ; then if [[ "$appNewVersion" == "" ]] ; then
echo "No appNewVersion!" echo "No appNewVersion!"
else
if [[ $( echo "$appNewVersion" | grep -i "[0-9.]" ) == "" || $appNewVersion == "" ]]; then
echo "${RED}-> !! ERROR in appNewVersion${NC}"
labelError=1
else else
if [[ $appNewVersion != $( echo "$appNewVersion" | sed -E 's/[^0-9]*([0-9.]*)[^0-9]*/\1/g' ) ]]; then if [[ $( echo "$appNewVersion" | grep -i "[0-9.]" ) == "" || $appNewVersion == "" ]]; then
echo "${YELLOW}Warning: Version contain not only numbers and dots.${NC}" echo "${RED}-> !! ERROR in appNewVersion${NC}"
labelWarning=1 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 fi
echo "Version: $appNewVersion" ;
fi fi
fi if curl -sfL --output /dev/null -r 0-0 "$downloadURL" ; then
if curl -sfL --output /dev/null -r 0-0 "$downloadURL" ; then echo "${GREEN}OK: downloadURL works OK${NC}"
echo "${GREEN}OK: downloadURL works OK${NC}" if [[ $(echo "$downloadURL" | sed -E 's/.*\.([a-zA-Z]*)\s*/\1/g' ) == "${expectedExtension}" ]]; then
if [[ $(echo "$downloadURL" | sed -E 's/.*\.([a-zA-Z]*)\s*/\1/g' ) == "${expectedExtension}" ]]; then echo "${GREEN}OK: download extension MATCH on ${expectedExtension}${NC}"
echo "${GREEN}OK: download extension MATCH on ${expectedExtension}${NC}" else
else if [[ $(echo "$downloadURL" | grep -io "github.com") != "github.com" ]]; then
if [[ $(echo "$downloadURL" | grep -io "github.com") != "github.com" ]]; then URLheader=$( curl -fsIL "$downloadURL" )
URLheader=$( curl -fsIL "$downloadURL" ) if [[ "${URLheader}" != "" ]]; then
if [[ "${URLheader}" != "" ]]; then URLlocation=$( echo "${URLheader}" | grep -i "^location" )
URLlocation=$( echo "${URLheader}" | grep -i "^location" ) URLfilename=$( echo "${URLheader}" | grep -i "filename=" )
URLfilename=$( echo "${URLheader}" | grep -i "filename=" ) if [[ "${URLlocation}" != "" ]]; then
if [[ "${URLlocation}" != "" ]]; then URLextension=$( echo "${URLlocation}" | tail -1 | sed -E 's/.*\.([a-zA-Z]*)\s*/\1/g' | tr -d '\r\n' )
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 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 fi
URLextension=${URLextension:l} else
if [[ "${URLextension}" == "${expectedExtension}" ]]; then githubPart="$(echo "$downloadURL" | cut -d "/" -f4-6)"
echo "${GREEN}OK: download extension MATCH on ${URLextension}${NC}" if [[ "$(curl -fsL "$downloadURL" | grep -io "${githubPart}.*\.${expectedExtension}")" != "" ]]; then
echo "${GREEN}OK: download extension MATCH on ${expectedExtension}${NC}"
else 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 labelError=1
fi 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
fi fi
else
echo "${RED}-> !! ERROR in downloadURL${NC}"
labelError=1
fi fi
else if [[ $labelWarning != 0 ]]; then; echo "${YELLOW}########## Warning in label: $label${NC}"; ((countWarning++)); fi
echo "${RED}-> !! ERROR in downloadURL${NC}" if [[ $labelError != 0 ]]; then; echo "${RED}########## ERROR in label: $label${NC}"; ((countError++)); fi
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 (($archLabels[(Ie)$label])); then if (($archLabels[(Ie)$label])); then
secondRoundLabels+=( "$label" ) secondRoundLabels+=( "$label" )
fi fi
else else
echo "Label: ${label} is not it's own file in Labels-folder. Skipping" echo "Label: ${label} is not it's own file in Labels-folder. Skipping"
fi fi