This commit is contained in:
parent
ea2247d3f9
commit
44afb1bf46
1 changed files with 21 additions and 9 deletions
30
cd.sh
30
cd.sh
|
@ -20,7 +20,7 @@ cd_main () {
|
|||
cd_install_git
|
||||
cd_install_python
|
||||
cd_clean_packages_cache
|
||||
cd_clone_parent_repositories "${@}"
|
||||
cd_install_python_modules "${@}"
|
||||
cd_execute_python_module "${@}"
|
||||
}
|
||||
|
||||
|
@ -244,21 +244,33 @@ cd_clean_packages_cache () {
|
|||
esac
|
||||
}
|
||||
|
||||
cd_clone_parent_repositories () {
|
||||
cd_install_python_modules () {
|
||||
local path
|
||||
local repository
|
||||
local root
|
||||
cd_step "Clone parent repositories"
|
||||
local url
|
||||
cd_step "Install Python modules"
|
||||
root="$(mktemp --directory)" || exit
|
||||
for repository in "${@}" ; do
|
||||
echo "${repository}"
|
||||
url="${CD_PROJECTS_URL}/${repository}"
|
||||
echo -n "
|
||||
${url}
|
||||
↓
|
||||
"
|
||||
git clone \
|
||||
"${CD_PROJECTS_URL}/${repository}" "${root}/${repository}" \
|
||||
"${url}" "${root}/${repository}" \
|
||||
|| exit
|
||||
path="${root}/${repository}/${repository}"
|
||||
echo -n "\
|
||||
${path}
|
||||
↓
|
||||
${CD_PYTHON_PACKAGES}
|
||||
"
|
||||
cp --recursive \
|
||||
"${root}/${repository}/${repository}" "${CD_PYTHON_PACKAGES}" \
|
||||
"${path}" "${CD_PYTHON_PACKAGES}" \
|
||||
|| exit
|
||||
done
|
||||
rm --force --recursive "${root}" || exit
|
||||
cd_rm "${root}"
|
||||
}
|
||||
|
||||
cd_execute_python_module () {
|
||||
|
@ -292,9 +304,9 @@ cd_install_package () {
|
|||
}
|
||||
|
||||
cd_rm () {
|
||||
if [ -f "${1}" ] ; then
|
||||
if [ -e "${1}" ] ; then
|
||||
echo "× $(realpath "${1}")"
|
||||
rm "${1}" || exit
|
||||
rm --recursive "${1}" || exit
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue