spcd/cmd/cd-clone-python.sh
2024-03-25 20:49:12 +01:00

15 lines
351 B
Bash
Executable file

[ "${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}"