Skip to content

Instantly share code, notes, and snippets.

@khoa-io
Created September 14, 2021 03:35
Show Gist options
  • Save khoa-io/3a990078d0bb58248c205a20f9baab35 to your computer and use it in GitHub Desktop.
Save khoa-io/3a990078d0bb58248c205a20f9baab35 to your computer and use it in GitHub Desktop.
Yet another repo launcher that call the latest launcher
#!/usr/bin/env /bin/sh
# Yet another repo launcher that call the latest launcher
if test -f "`pwd`/.repo/repo/repo"; then
`pwd`/.repo/repo/repo $*
else
if [ ! -f "${HOME}/.local/bin" ]; then
mkdir -p "${HOME}/.local/bin"
fi
if [ ! -f "${HOME}/.local/bin/google-repo" ]; then
curl https://storage.googleapis.com/git-repo-downloads/repo > "${HOME}/.local/bin/google-repo"
chmod a+rx "${HOME}/.local/bin/google-repo"
fi
${HOME}/.local/bin/google-repo $*
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment