Compare commits
9 commits
c0557813eb
...
7d074f4588
Author | SHA1 | Date | |
---|---|---|---|
7d074f4588 | |||
44ae59fed8 | |||
688fd59dd9 | |||
488f8513d3 | |||
582900d46b | |||
db2276ea4a | |||
433f5a98fb | |||
9c2c834603 | |||
33dfc13672 |
2 changed files with 57 additions and 43 deletions
|
@ -211,18 +211,14 @@ Handle project workflows in a unified way:
|
||||||
|
|
||||||
## When
|
## When
|
||||||
|
|
||||||
### First
|
|
||||||
|
|
||||||
* try git repo url variable first for shunit
|
|
||||||
|
|
||||||
### Shell
|
### Shell
|
||||||
|
|
||||||
|
* comment
|
||||||
* fit banner to text
|
* fit banner to text
|
||||||
* review repositories handling for systems
|
* review repositories handling for systems
|
||||||
* opensuse
|
* opensuse
|
||||||
* codecs repository
|
* codecs repository
|
||||||
* disable & enable https
|
* disable & enable https
|
||||||
* write function to clone git repositories
|
|
||||||
* write unit tests
|
* write unit tests
|
||||||
|
|
||||||
### Shell → Python
|
### Shell → Python
|
||||||
|
@ -258,9 +254,12 @@ Handle project workflows in a unified way:
|
||||||
* set workflow templates
|
* set workflow templates
|
||||||
* actions
|
* actions
|
||||||
* includes
|
* includes
|
||||||
|
* try git repo url variable first for shunit
|
||||||
* write unit tests
|
* write unit tests
|
||||||
|
|
||||||
### Later
|
### Later
|
||||||
|
|
||||||
* automate versions fetching
|
* automate versions fetching
|
||||||
|
* document behavior differences
|
||||||
|
* generate graphs
|
||||||
* turn readme into documentation
|
* turn readme into documentation
|
||||||
|
|
|
@ -514,10 +514,12 @@ ${SPCD_PYTHON_VENV}/lib/${SPCD_PYTHON_COMMAND}/site-packages"
|
||||||
spcd_split
|
spcd_split
|
||||||
spcd_echo "SPCD_PYTHON_PACKAGES" "SPCD_PYTHON_VENV_PACKAGES"
|
spcd_echo "SPCD_PYTHON_PACKAGES" "SPCD_PYTHON_VENV_PACKAGES"
|
||||||
# variables
|
# variables
|
||||||
|
# certificate authorities
|
||||||
[ -n "${SPCD_CA_1}" ] && SPCD_CA=true
|
[ -n "${SPCD_CA_1}" ] && SPCD_CA=true
|
||||||
#
|
# downloads
|
||||||
|
SPCD_DL="$(mktemp --directory)"
|
||||||
spcd_split
|
spcd_split
|
||||||
spcd_echo "SPCD_CA"
|
spcd_echo "SPCD_CA" "SPCD_DL"
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_list_working_directory() {
|
spcd_list_working_directory() {
|
||||||
|
@ -711,32 +713,16 @@ index-url = ${SPCD_URL_PYTHON}
|
||||||
|
|
||||||
spcd_install_python_modules() {
|
spcd_install_python_modules() {
|
||||||
spcd_step "Install Python modules"
|
spcd_step "Install Python modules"
|
||||||
spcd_ipm__root="$(mktemp --directory)" || exit
|
|
||||||
spcd_ipm__target="${SPCD_PYTHON_VENV_PACKAGES}"
|
spcd_ipm__target="${SPCD_PYTHON_VENV_PACKAGES}"
|
||||||
echo "→ ${spcd_ipm__root}"
|
spcd_ls "${spcd_ipm__target}"
|
||||||
for spcd_ipm__repository in "${SPCD_GIT_MAIN}" "${SPCD_GIT_ROOT}"; do
|
|
||||||
spcd_ipm__url="$(spcd_get_git_url "${spcd_ipm__repository}")"
|
|
||||||
spcd_ipm__name="$(basename "${spcd_ipm__url}")"
|
|
||||||
spcd_split
|
spcd_split
|
||||||
echo "\
|
spcd_ipm__path="$(spcd_pip_install "${SPCD_GIT_MAIN}")"
|
||||||
${spcd_ipm__url}
|
|
||||||
↓"
|
|
||||||
git clone \
|
|
||||||
"${spcd_ipm__url}" \
|
|
||||||
"${spcd_ipm__root}/${spcd_ipm__name}" ||
|
|
||||||
exit
|
|
||||||
spcd_ipm__path="${spcd_ipm__root}/${spcd_ipm__name}/${spcd_ipm__name}"
|
|
||||||
echo "\
|
|
||||||
${spcd_ipm__path}
|
|
||||||
↓
|
|
||||||
${spcd_ipm__target}"
|
|
||||||
cp --recursive "${spcd_ipm__path}" "${spcd_ipm__target}" ||
|
|
||||||
exit
|
|
||||||
# check matching of file and variable
|
# check matching of file and variable
|
||||||
spcd_ipm__script="${spcd_ipm__root}/${spcd_ipm__name}/spcd.sh"
|
spcd_ipm__script="${spcd_ipm__path}/main.sh"
|
||||||
if [ -f "${spcd_ipm__script}" ]; then
|
if [ -f "${spcd_ipm__script}" ]; then
|
||||||
spcd_split
|
spcd_split
|
||||||
spcd_ipm__check="${spcd_ipm__root}/check.${SPCD_CMD_SUM}"
|
ls -l "${spcd_ipm__script}"
|
||||||
|
spcd_ipm__check="${spcd_ipm__script}.${SPCD_CMD_SUM}"
|
||||||
"${SPCD_CMD_SUM}" "${spcd_ipm__script}" >"${spcd_ipm__check}"
|
"${SPCD_CMD_SUM}" "${spcd_ipm__script}" >"${spcd_ipm__check}"
|
||||||
printf "%s" "${SPCD}" >"${spcd_ipm__script}"
|
printf "%s" "${SPCD}" >"${spcd_ipm__script}"
|
||||||
ls -l "${spcd_ipm__script}"
|
ls -l "${spcd_ipm__script}"
|
||||||
|
@ -744,11 +730,10 @@ ${spcd_ipm__target}"
|
||||||
ls -l "${spcd_ipm__script}"
|
ls -l "${spcd_ipm__script}"
|
||||||
"${SPCD_CMD_SUM}" -c "${spcd_ipm__check}" || spcd_error_ci "SPCD"
|
"${SPCD_CMD_SUM}" -c "${spcd_ipm__check}" || spcd_error_ci "SPCD"
|
||||||
fi
|
fi
|
||||||
done
|
spcd_split
|
||||||
|
spcd_pip_install "${SPCD_GIT_ROOT}"
|
||||||
spcd_split
|
spcd_split
|
||||||
spcd_ls "${spcd_ipm__target}"
|
spcd_ls "${spcd_ipm__target}"
|
||||||
spcd_split
|
|
||||||
spcd_rm "${spcd_ipm__root}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_install_packages() {
|
spcd_install_packages() {
|
||||||
|
@ -882,7 +867,22 @@ spcd_error_os() {
|
||||||
exit "${SPCD_ERROR_OS}"
|
exit "${SPCD_ERROR_OS}"
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_get_git_url() {
|
spcd_git_clone() {
|
||||||
|
if [ -n "${1}" ]; then
|
||||||
|
spcd_gc__name="$(basename "${1}")"
|
||||||
|
spcd_gc__path="${SPCD_DL}/${spcd_gc__name}"
|
||||||
|
spcd_gc__url="$(spcd_git_url "${1}")"
|
||||||
|
echo "\
|
||||||
|
${spcd_gc__url}
|
||||||
|
↓"
|
||||||
|
git clone \
|
||||||
|
"${spcd_gc__url}" \
|
||||||
|
"${spcd_gc__path}"
|
||||||
|
echo "${spcd_gc__path}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
spcd_git_url() {
|
||||||
if [ -n "${1}" ]; then
|
if [ -n "${1}" ]; then
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
http*) echo "${1}" ;;
|
http*) echo "${1}" ;;
|
||||||
|
@ -948,6 +948,21 @@ spcd_openssl() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spcd_pip_install() {
|
||||||
|
if [ -n "${1}" ]; then
|
||||||
|
spcd_pi__name="$(basename "${1}")"
|
||||||
|
spcd_pi__path="$(spcd_git_clone "${1}")"
|
||||||
|
spcd_pi__path="${spcd_pi__path}/${spcd_pi__name}"
|
||||||
|
spcd_pi__target="${SPCD_PYTHON_VENV_PACKAGES}"
|
||||||
|
echo "\
|
||||||
|
${spcd_pi__path}
|
||||||
|
↓
|
||||||
|
${spcd_pi__target}"
|
||||||
|
cp --recursive "${spcd_pi__path}" "${spcd_pi__target}"
|
||||||
|
echo "${spcd_pi__target}/${spcd_pi__name}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
spcd_rm() {
|
spcd_rm() {
|
||||||
spcd_rm__path="${1}"
|
spcd_rm__path="${1}"
|
||||||
if [ -e "${spcd_rm__path}" ]; then
|
if [ -e "${spcd_rm__path}" ]; then
|
Loading…
Reference in a new issue