Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
Spelling and Formatting corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
jorinvo committed Jan 17, 2017
1 parent d8e9c8a commit ee3cfbe
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var version string

const (
// Printed for -help, -h or with wrong number of arguments
usage = `Embarrassing simple Github backup tool
usage = `Embarrassing simple GitHub backup tool
Usage: %s [flags] directory
Expand All @@ -28,9 +28,9 @@ At least one of -account or -secret must be specified.
Flags:
`
more = "\nFor more visit https://qvl.io/ghbackup."
accountUsage = `Github user or organization name to get repositories from.
accountUsage = `GitHub user or organization name to get repositories from.
If not specified, all repositories the authenticated user has access to will be loaded.`
secretUsage = `Authentication secret for Github API.
secretUsage = `Authentication secret for GitHub API.
Can use the users password or a personal access token (https://github.com/settings/tokens).
Authentication increases rate limiting (https://developer.github.com/v3/#rate-limiting) and enables backup of private repositories.`
)
Expand All @@ -41,7 +41,7 @@ func main() {
account := flag.String("account", "", accountUsage)
secret := flag.String("secret", "", secretUsage)
versionFlag := flag.Bool("version", false, "Print binary version")
silent := flag.Bool("silent", false, "Surpress all output")
silent := flag.Bool("silent", false, "Suppress all output")

// Parse args
flag.Usage = func() {
Expand Down
28 changes: 14 additions & 14 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Go Report Card](https://goreportcard.com/badge/qvl.io/ghbackup)](https://goreportcard.com/report/qvl.io/ghbackup)


Embarrassing simple Github backup tool
Embarrassing simple GitHub backup tool

Usage: ghbackup [flags] directory

Expand All @@ -15,19 +15,19 @@

Flags:
-account string
Github user or organization name to get repositories from.
GitHub user or organization name to get repositories from.
If not specified, all repositories the authenticated user has access to
will be loaded.
-secret string
Authentication secret for Github API.
Authentication secret for GitHub API.
Can use the users password or a personal access token (https://github.c
om/settings/tokens).
Authentication increases rate limiting (https://developer.github.com/v3
/#rate-limiting) and enables backup of private repositories.
-silent
Surpress all output
Suppress all output
-version
Print binary version
Print binary version

For more visit https://qvl.io/ghbackup.

Expand Down Expand Up @@ -64,19 +64,19 @@ Let's setup `ghbackup` on a Linux server and make it run daily at 1am. This work
There are different tools to do this:


### Systemd and sleepto
### systemd and sleepto

[Systemd](https://en.wikipedia.org/wiki/Systemd) runs on most Linux systems and using [sleepto](https://qvl.io/sleepto) it's easy to create a service to schedule a backup.
[systemd](https://freedesktop.org/wiki/Software/systemd/) runs on most Linux systems and using [sleepto](https://qvl.io/sleepto) it's easy to create a service to schedule a backup.

1. Create a new unit file:
- Create a new unit file:
``` sh
sudo touch /etc/systemd/system/ghbackup.service && sudo chmod 644 $_
```

2. Edit file:
- Edit file:
```
[Unit]
Description=Github backup
Description=GitHub backup
After=network.target
[Service]
Expand All @@ -88,16 +88,16 @@ Restart=always
WantedBy=multi-user.target
```

3. Replace the paths with your options.
- Replace the paths with your options.

4. Start service and enable it on boot:
- Start service and enable it on boot:
``` sh
sudo systemctl daemon-reload
sudo systemctl start ghbackup
sudo systemctl enable ghbackup
```

5. Check if service is running:
- Check if service is running:
``` sh
systemctl status ghbackup
```
Expand All @@ -123,7 +123,7 @@ For example:

## What happens?

Get all repositories of a Github account.
Get all repositories of a GitHub account.
Save them to a folder.
Update already cloned repositories.

Expand Down

0 comments on commit ee3cfbe

Please sign in to comment.