Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iamnewton/clone-all
Clones every repository or gist from a Github user, optionally to a specified directory
https://github.com/iamnewton/clone-all
bash clone github script shell
Last synced: 20 days ago
JSON representation
Clones every repository or gist from a Github user, optionally to a specified directory
- Host: GitHub
- URL: https://github.com/iamnewton/clone-all
- Owner: iamnewton
- License: gpl-3.0
- Created: 2014-04-22T23:21:47.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-03-16T01:51:16.000Z (over 4 years ago)
- Last Synced: 2024-04-14T22:17:25.020Z (7 months ago)
- Topics: bash, clone, github, script, shell
- Language: Shell
- Homepage: https://iamnewton.github.io/clone-all/
- Size: 52.7 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# clone-all(1)
Clones every repository or gist from a Github user, optionally to a specified directory.
clone-all(1) is perfect to help you set up a new computer, back up your Github account, or if you just want to grab all of a users public repositories. It also goes great with an [OS X setup script][osxdefaults] or [dotfiles setup][dotfiles].
## Requirements
* [Git][git] and [Github account][github]
* [Homebrew][homebrew] (for package installation of the following)
* [jq][jq] (for JSON to bash manipulation)
* [roundup][roundup] (for testing)## How to install
clone-all(1) is a [shell script][bin], so installation is simple. [Download][download], extract and copy the script in the `bin` directory over to the `/usr/local/bin` directory and make sure it's in your `$PATH`. The man page, `man clone-all`, can be installed by copying over the `clone-all.1` file to `/usr/share/man/man1`.
## One-line installation
```bash
$ bash -c "$(curl -fsSL raw.github.com/iamnewton/clone-all/go/install)"
```N.B. - using the one-line installation will download and install all of the dependencies, including the man page.
## Usage
```bash
$ clone-all [options] []
```### Options
| Flag | Meaning |
| :--------------------| :------------------------------------------------------------- |
| `-h, --help` | Print out help text |
| `-f, --feed ` | `` can be either `gists` or `repos`, default is `repos` |
| `-v, --version` | Print out version |N.B. - Default `` is `$HOME/Downloads`.
## Acknowledgements
Inspiration and code was taken from many sources, but mostly from StackOverflow:
* [Handling positional parameters](http://wiki.bash-hackers.org/scripting/posparams)
* [How to get the latest tag name in current branch in Git?](http://stackoverflow.com/questions/1404796/how-to-get-the-latest-tag-name-in-current-branch-in-git)
* [How to add a progress bar to a shell script?](http://stackoverflow.com/a/16348366)
* [How to increment a variable in bash?](http://askubuntu.com/a/385531)
* [Other Comparison Operators](http://www.tldp.org/LDP/abs/html/comparison-ops.html)
* [The Basics of Using the Sed Stream Editor to Manipulate Text in Linux](https://www.digitalocean.com/community/articles/the-basics-of-using-the-sed-stream-editor-to-manipulate-text-in-linux)
* [sed, a stream editor](http://www.gnu.org/software/sed/manual/sed.html)
* [bash: replace an entire line in a text file](http://stackoverflow.com/questions/11145270/bash-replace-an-entire-line-in-a-text-file)
* [In bash, how do I convert a space-delimited string into an array?](http://stackoverflow.com/questions/9293887/in-bash-how-do-i-convert-a-space-delimited-string-into-an-array)
* [Returning Values from Bash Functions](http://www.linuxjournal.com/content/return-values-bash-functions)
* [Github API pagination via curl](https://gist.github.com/michfield/4525251)
* [How to check if a program exists from a bash script?](http://stackoverflow.com/a/677212)[bin]: https://github.com/iamnewton/clone-all/blob/master/clone-all
[dotfiles]: https://github.com/iamnewton/dotfiles
[download]: https://github.com/iamnewton/clone-all/archive/master.zip
[github]: https://github.com/join
[git]: http://git-scm.com
[homebrew]: http://brew.sh
[jq]: https://stedolan.github.io/jq/
[osxdefaults]: https://github.com/iamnewton/osxdefaults
[roundup]: https://github.com/bmizerany/roundup