Skip to content

Instantly share code, notes, and snippets.

View andrader's full-sized avatar

Rubens Andrade andrader

View GitHub Profile
# /// script
# dependencies = [
# "toml",
# "rich",
# ]
# ///
# To run the script use `uv run convert_pipfile_to_uv.py` (this way it automagically installs the dependencies)
import re
from pathlib import Path
# first argument is repository to duplicate, second is a new empty repository
# `duplicate_repo.sh ARG1 ARG2`
# or
# `curl GIST_RAWURL | bash -s ARG1 ARG2`
SOURC="$1" && \
DEST="$2" && \
echo $SOURC $destrepo && \
git clone --bare $SOURC tmprepo && \
cd tmprepo && \
git push --mirror $DEST && \