Update checkLabels.sh

This commit is contained in:
Søren Theilgaard
2022-01-12 14:03:30 +01:00
parent da21ea8582
commit 180ca0952b

View File

@@ -3,7 +3,7 @@
export PATH=/usr/bin:/bin:/usr/sbin:/sbin export PATH=/usr/bin:/bin:/usr/sbin:/sbin
# Check Installomator labels from fragments # Check Installomator labels from fragments
# 2021 Søren Theilgaard (@theilgaard) # 2021-2022 Søren Theilgaard (@theilgaard)
# This script will test labels and check if download link is active, and if version is defined. # This script will test labels and check if download link is active, and if version is defined.
# If labels are written to the script only those will be tested. # If labels are written to the script only those will be tested.
@@ -132,11 +132,11 @@ countError=0
# Loop through the 2 architectures # Loop through the 2 architectures
for fixedArch in i386 arm64; do for fixedArch in i386 arm64; do
echo "${BLUE}Architecture: $fixedArch${NC}" echo "${BLUE}Architecture: $fixedArch${NC}"
echo echo
# Loop through all labels # Loop through all labels
for label in $allLabels; do for label in $allLabels; do
echo "########## $label" echo "########## $label"
labelWarning=0; labelError=0; expectedExtension=""; URLextension="" labelWarning=0; labelError=0; expectedExtension=""; URLextension=""
name=""; type=""; downloadURL=""; curlOptions=""; appNewVersion=""; expectedTeamID=""; blockingProcesses=""; updateTool=""; updateToolArguments=""; archiveName="" name=""; type=""; downloadURL=""; curlOptions=""; appNewVersion=""; expectedTeamID=""; blockingProcesses=""; updateTool=""; updateToolArguments=""; archiveName=""
@@ -238,52 +238,21 @@ for label in $allLabels; do
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
echo echo
done done
# check errorLabels using Installomator if [[ $fixedArch == i386 ]] ; then
#echo "Testing $errorLabels using Installomator"
#if [[ countError > 0 ]]; then
# allLabels=( ${=errorLabels} )
# for errorLabel in $errorLabels; do
# exit_status=$( . $repo_dir/assemble.sh $errorLabel DEBUG=2 INSTALL=force | grep exit | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' )
# if [[ ${exit_status} -eq 0 ]] ; then
# echo "$errorLabel works fine"
# errorLabels=("${(@)errorLabels:#$errorLabel}")
# ((countError--))
# fi
# done
#fi
if [[ $fixedArch == i386 ]] ; then
errorLabelsi386=( ${=errorLabels} ) errorLabelsi386=( ${=errorLabels} )
else else
errorLabelsarm64=( ${=errorLabels} ) errorLabelsarm64=( ${=errorLabels} )
fi fi
#eval errorLabels${fixedArch}="${errorLabels}"
errorLabels="" errorLabels=""
allLabels=( ${=secondRoundLabels} ) allLabels=( ${=secondRoundLabels} )
archLabels=() archLabels=()
echo echo
done done
#errorLabels${fixedArch}=(${=errorLabels})
# check errorLabels using Installomator
#echo "Testing $errorLabels using Installomator"
#if [[ countError > 0 ]]; then
# allLabels=( ${=errorLabels} )
# for errorLabel in $errorLabels; do
# exit_status=$( . $repo_dir/assemble.sh $errorLabel DEBUG=2 INSTALL=force | grep exit | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' )
# if [[ ${exit_status} -eq 0 ]] ; then
# echo "$errorLabel works fine"
# errorLabels=("${(@)errorLabels:#$errorLabel}")
# ((countError--))
# fi
# done
#fi
#errorLabels2=( ${=errorLabels} )
rm checkLabelCurrent.sh rm checkLabelCurrent.sh
#${SELFLOCATION}/Installomator.sh version
#echo
if [[ countWarning -gt 0 ]]; then if [[ countWarning -gt 0 ]]; then
echo "${YELLOW}Warnings counted: $countWarning${NC}" echo "${YELLOW}Warnings counted: $countWarning${NC}"
echo "${YELLOW}${warningLabels}${NC}" echo "${YELLOW}${warningLabels}${NC}"