Compare commits

...

2 commits

Author SHA1 Message Date
008a44c5eb
readme/main
Some checks failed
/ job (push) Failing after 7m43s
2024-06-24 22:14:38 +02:00
133b8babd8
if → && 2024-06-24 21:57:44 +02:00
2 changed files with 6 additions and 11 deletions

13
pidd.sh
View file

@ -372,9 +372,8 @@ Acquire::https::Verify-Peer False;
# github → gitea → forgejo
if [ -n "${GITHUB_SERVER_URL}" ]; then
PIDD_PROJECT_ROOT="$(dirname "${GITHUB_SERVER_URL}")//"
if [ -n "${GITHUB_TOKEN}" ]; then
[ -n "${GITHUB_TOKEN}" ] &&
PIDD_PROJECT_ROOT="${PIDD_PROJECT_ROOT}${GITHUB_TOKEN}@"
fi
PIDD_PROJECT_ROOT="${PIDD_PROJECT_ROOT}$(basename "${GITHUB_SERVER_URL}")"
else
pidd_error_ci "GITHUB_SERVER_URL"
@ -701,11 +700,10 @@ pidd_error_os() {
pidd_grep_os() {
pidd_grep_os__variable="${1}"
if [ -n "${pidd_grep_os__variable}" ]; then
[ -n "${pidd_grep_os__variable}" ] &&
grep "^${pidd_grep_os__variable}=" "/etc/os-release" |
sed "s|^${pidd_grep_os__variable}=||" |
sed "s|^\"\(.*\)\"$|\1|"
fi
}
pidd_install_package() {
@ -719,8 +717,8 @@ pidd_ln_python() {
pidd_ln_python__command="${1}"
if [ -n "${pidd_ln_python__command}" ]; then
echo "${PIDD_PYTHON_ALIAS}${pidd_ln_python__command}"
ln -f -s "${pidd_ln_python__command}" "/usr/bin/${PIDD_PYTHON_ALIAS}" ||
exit
ln -f -s "${pidd_ln_python__command}" \
"/usr/bin/${PIDD_PYTHON_ALIAS}" || exit
fi
}
@ -770,8 +768,7 @@ pidd_sed() {
pidd_cat "${pidd_sed__file}"
for pidd_sed__regex in "${@}"; do
sed --in-place "s${pidd_sed__regex}g" "${pidd_sed__file}" &&
pidd_cat "${pidd_sed__file}" ||
exit
pidd_cat "${pidd_sed__file}" || exit
done
fi
}

View file

@ -88,9 +88,7 @@ from various contexts of CA, CI and OCI / OS.
* lint
* .py
* .sh
* write bootstrap entry point
### .sh
* reduce single conditions with &&
* support opensuse