Skip to content

Commit

Permalink
better practice
Browse files Browse the repository at this point in the history
  • Loading branch information
Aloxion committed Jun 2, 2024
1 parent 5cdb5dd commit 50d3c0d
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
45 changes: 44 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,44 @@
# chewed-gum
# chewed-gum

# Install Using CURL

To use this tool, you need two things.

* A path, where it is going to be exported to.
* Gum | Charmbracelet


## Gum

## Tool - Chewed gum

First make you sure you have a directory, you can extract the tar file to.

e.g:

```bash
mkdir $HOME/chewed-gum
```

This will create a directory chewed-gum from your home directory.


To download the release, you can use this command:
If you want to declare a specific path, you can adjust the "$HOME/chewed-gum"
### Download latest tag
```sh
LATEST_TAG=$(curl -s https://api.github.com/repos/Aloxion/chewed-gum/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') && mkdir -p $HOME/chewed-gum-$LATEST_TAG && curl -sL "https://github.com/Aloxion/chewed-gum/archive/refs/tags/${LATEST_TAG}.tar.gz" | tar -xzf - --strip-components=1 -C $HOME/chewed-gum-$LATEST_TAG && chmod +x $HOME/chewed-gum-$LATEST_TAG/chewed-gum && (grep -q 'export PATH=$HOME/chewed-gum-$LATEST_TAG:$PATH' ~/.zshrc || echo 'export PATH=$HOME/chewed-gum-$LATEST_TAG:$PATH' >> ~/.zshrc) && source ~/.zshrc
```

### Downloade specifc tag
Remember, to replace \<tag-version>, with the actual version you want to use.
```sh
curl -sL "https://github.com/Aloxion/chewed-gum/archive/refs/tags/<tag-version>.tar.gz" | tar -xzf - --strip-components=1 -C $HOME/chewed-gum-<tag-version>
```

### Permissions
If any issues occur with permission, remember to allow the chewed-gum file to be ran like so:

```sh
chmod +x $HOME/chewed-gum/chewed-gum
```
File renamed without changes.

0 comments on commit 50d3c0d

Please sign in to comment.