diff --git a/cd-clone-python b/cd-clone-python new file mode 100755 index 0000000..52eb00e --- /dev/null +++ b/cd-clone-python @@ -0,0 +1,15 @@ +[ "${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}"