Skip to content

Commit

Permalink
Update README.md and GUIDE.md contents
Browse files Browse the repository at this point in the history
  • Loading branch information
dominiksalvet committed Jun 27, 2019
1 parent 3ee27b8 commit cd5397c
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 11 deletions.
10 changes: 6 additions & 4 deletions GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@

GitPack works only with master branch of Git projects. It uses either latest tag or latest commit as a default commit.

GitPack works only with the *.gitpack* directory of Git repositories with the following structure:
GitPack works with the *.gitpack* directory of Git repositories with the following structure:

* *.gitpack/install/\<method\>* is a directory
* Its name starts with either *global* or *local* based on installation type.
* **Its name always starts with** either *global* or *local* based on installation type.
* To restrict execution to a particular system, append its name as *-\<system\>*.
* E.g., file name *local-Darwin* represents local installation for macOS-only.
* *.gitpack/install/\<method\>/map* is a file
* Describes which project files are recursively copied and where during installation.
* Has only one source path and one target directory path per line.
* **Has only one source path** and one target directory path per line.
* E.g., line `bin/vhdldep /usr/local/bin` copies *vhdldep* file to */usr/local/bin* directory.
* *.gitpack/install/\<method\>/\<script\>* is an executable file (optional)
* *.gitpack/install/\<method\>/\<script\>* is an executable file **(optional)**
* Its name is *precp*, *postcp*, *prerm*, or *postrm*.
* It is run before file copying, after, before file removal, or after.
* E.g., *postcp* can modify */etc/rc.local* file to execute *asus-fan-control* after boot.

Git repositories with such *.gitpack* directory can be installed, updated and uninstalled using GitPack by end users.
97 changes: 90 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<p align="center">
<a href="https://github.com/dominiksalvet/gitpack">
<img src="https://img.shields.io/badge/GitPack-ready-571997.svg" alt="GitPack ready"></a>
<img src="https://img.shields.io/badge/Git-Pack-571997.svg" alt="GitPack"></a>
<a href="https://reuse.software/">
<img src="https://reuse.software/badge/reuse-compliant.svg" alt="reuse compliant"></a>
<a href="https://github.com/RichardLitt/standard-readme">
Expand All @@ -20,27 +20,110 @@

> The simplest Git-based package manager.
Long description.
Wouldn't it be great to **install and update** your favorite Git projects like this?

```
gitpack install <url>
```

And when they are no longer needed, **uninstall** them that way?

```
gitpack uninstall <url>
```

If you are in, then GitPack comes in pretty handy. All you need is a URL of a Git project and GitPack will do the rest.

---

**Are you a developer?** Do you like the idea stated above? Then keep reading in the [Developer](#developer) section.

> Do you want to support this awesome project? Then spread the word!
## Table of Contents

* [Install](#install)
* [Usage](#usage)
* [Example](#example)
* [Developer](#developer)
* [Badge](#badge)
* [Thanks](#thanks)
* [Contributing](#contributing)
* [License](#license)

## Install

Install content.
**Global** (system) installation:

```sh
mkdir -p /tmp/gitpack/ && cd /tmp/gitpack/ && # prepare a temporary directory
git clone https://github.com/dominiksalvet/gitpack.git . && # clone repository
git checkout "$(git describe --tags --abbrev=0)" && # use latest version
sudo bin/gitpack install github.com/dominiksalvet/gitpack # install GitPack
```

**Local** (user) installation:

```sh
mkdir -p /tmp/gitpack/ && cd /tmp/gitpack/ && # prepare a temporary directory
git clone https://github.com/dominiksalvet/gitpack.git . && # clone repository
git checkout "$(git describe --tags --abbrev=0)" && # use latest version
bin/gitpack install github.com/dominiksalvet/gitpack # install GitPack
```

## Usage

Usage content.
**Install or update** a Git project:

```
gitpack install <url>
```

**Uninstall** a Git project:

```
gitpack uninstall <url>
```

Show **status** of a Git project:

```
gitpack status <url>
```

> Your favorite project is not compatible, right? Then encourage its developers to take a look at the [Developer](#developer) section.
## Developer

Why should you use GitPack in your projects?

* Simple by design
* Easy-to-use for developers and users
* Programming language independent
* Runs on Linux, macOS and Windows (WSL)
* Shell and Git is all you need
* Global and local installations
* Delta updates
* POSIX-friendly environment

How? The [*GUIDE.md*](GUIDE.md) file will guide you. Then users can **immediately use GitPack to install your projects**.

Not sure? Take a look at [*.gitpack*](.gitpack) directory of GitPack itself. It can be that simple.

### Badge

GitPack projects work best with the following badge:

[![GitPack](https://img.shields.io/badge/Git-Pack-571997.svg)](https://github.com/dominiksalvet/gitpack)

Markdown:

```markdown
[![GitPack](https://img.shields.io/badge/Git-Pack-571997.svg)](https://github.com/dominiksalvet/gitpack)
```

### Example
## Thanks

Example content.
GitPack was born out of [gim](https://github.com/dominiksalvet/gim) from which it has learned a lot.

## Contributing

Expand Down

0 comments on commit cd5397c

Please sign in to comment.