This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# A simple script to backup an organization's GitHub repositories. | |
[[ -z "$GHBU_ORG" ]] && echo "Please set GHBU_ORG" && exit 1 | |
[[ -z "$GHBU_UNAME" ]] && echo "Please set GHBU_UNAME" && exit 1 | |
[[ -z "$GHBU_PASSWD" ]] && echo "Please set GHBU_PASSWD" && exit 1 | |
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files | |
GHBU_ORG=$GHBU_ORG # the GitHub organization whose repos will be backed up | |
GHBU_UNAME=$GHBU_UNAME # the username of a GitHub account (to use with the GitHub API) |