From 5aaa437dd8be48b40963aa9703dbc077cb47e371 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 23 Mar 2024 19:44:27 +0100 Subject: [PATCH] clone-python --- cd-clone-python | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 cd-clone-python 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}"