Internal: repository management will run on same host

Move executing check from the script
This commit is contained in:
Igor Pecovnik 2023-08-11 22:36:46 +02:00 committed by Igor
parent 41a88f6f5c
commit c2f213a6f6
1 changed files with 1 additions and 5 deletions

View File

@ -67,6 +67,7 @@ for release in "${distributions[@]}"; do
local forceoverwrite=""
ADDING_PACKAGES="false"
# shellcheck disable=SC2207,2199
[[ " ${DISTROS[@]} " =~ " ${release} " ]] && ADDING_PACKAGES="true"
# let's drop from publish if exits
@ -334,10 +335,6 @@ do
esac
done
# define job name
[[ $(cat /var/run/repomanagement 2>/dev/null) == "$output" ]] && echo "Running. Try again later" && exit 0
echo "${output}" | sudo tee /var/run/repomanagement &>/dev/null
# redefine output folder in Aptly
TempDir="$(mktemp -d || exit 1)"
sed 's|"rootDir": ".*"|"rootDir": "'$output'"|g' tools/repository/aptly.conf > "${TempDir}"/aptly.conf
@ -346,5 +343,4 @@ CONFIG="${TempDir}/aptly.conf"
# main
repo-manipulate "$input" "$output" "$command" "$password" "$releases"
RETURN=$?
sudo rm /var/run/repomanagement
exit $RETURN