spcd/cmd/cd-clone-python.sh

16 lines
351 B
Bash
Raw Normal View History

2024-03-23 18:44:27 +00:00
[ "${1}" ] && REPOSITORY_FULL="${1}" || exit
REPOSITORY_NAME="$(basename ${REPOSITORY_FULL})"
REPOSITORY_TEMP="$(mktemp --directory)"
git clone \
-- \
"${GITHUB_SERVER_URL}/${REPOSITORY_FULL}" \
"${REPOSITORY_TEMP}"
mv "${REPOSITORY_TEMP}/${REPOSITORY_NAME}" \
/usr/local/lib/python3.*/dist-packages/
rm --force --recursive \
"${REPOSITORY_TEMP}"