Compare commits

...

4 commits

Author SHA1 Message Date
b450c9534c
check matching
Some checks are pending
/ job (push) Has started running
2024-07-30 00:29:45 +02:00
6f6fc9d061
sha512sum 2024-07-30 00:18:51 +02:00
b2e90ddd43
↓ & split 2024-07-30 00:18:10 +02:00
07ae43d17e
first check 2024-07-30 00:08:04 +02:00
2 changed files with 14 additions and 11 deletions

View file

@ -103,5 +103,4 @@ from various contexts of CA, CI and OCI / OS.
### .sh
* check if file & variable match
* support opensuse

24
spcd.sh
View file

@ -42,6 +42,8 @@ spcd_main() {
spcd_set_environment_variables() {
spcd_step "Set environment variables"
# check script first
[ -n "${SPCD}" ] || spcd_error_ci "SPCD"
# continuous integration / github → gitea → forgejo
if [ -n "${GITHUB_ACTIONS}" ]; then
# project branch
@ -708,16 +710,6 @@ ${spcd_ipm__url}
"${spcd_ipm__url}" \
"${spcd_ipm__root}/${spcd_ipm__name}" ||
exit
spcd_ipm__script="${spcd_ipm__root}/${spcd_ipm__name}/spcd.sh"
if [ -f "${spcd_ipm__script}" ]; then
spcd_ipm__file="${spcd_ipm__root}/spcd.sh"
printf "%s" "${SPCD}" >"${spcd_ipm__file}"
ls -l "${spcd_ipm__file}"
dos2unix "${spcd_ipm__file}"
ls -l "${spcd_ipm__file}"
sha256sum "${spcd_ipm__file}"
sha256sum "${spcd_ipm__script}"
fi
spcd_ipm__path="${spcd_ipm__root}/${spcd_ipm__name}/${spcd_ipm__name}"
echo "\
${spcd_ipm__path}
@ -725,6 +717,18 @@ ${spcd_ipm__path}
${SPCD_PYTHON_PACKAGES}"
cp --recursive "${spcd_ipm__path}" "${SPCD_PYTHON_PACKAGES}" ||
exit
# check matching of file and variable
spcd_ipm__script="${spcd_ipm__root}/${spcd_ipm__name}/spcd.sh"
if [ -f "${spcd_ipm__script}" ]; then
spcd_split
spcd_ipm__check="${spcd_ipm__root}/check.sha512sum"
sha512sum "${spcd_ipm__script}" > "${spcd_ipm__check}"
printf "%s" "${SPCD}" >"${spcd_ipm__script}"
ls -l "${spcd_ipm__script}"
dos2unix "${spcd_ipm__script}"
ls -l "${spcd_ipm__script}"
sha512sum -c "${spcd_ipm__check}" || spcd_error_ci "SPCD"
fi
done
spcd_split
spcd_ls "${SPCD_PYTHON_PACKAGES}"