From 82c860a55a0b66e806d71bf18423911702aa4022 Mon Sep 17 00:00:00 2001 From: Aloxion Date: Sun, 2 Jun 2024 18:21:23 +0200 Subject: [PATCH] refactor(call): Reverting back to using chewed-gum --- README.md | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index b2abfaf..7d1a88e 100644 --- a/README.md +++ b/README.md @@ -12,33 +12,22 @@ To use this tool, you need two things. ## 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: +To download the release, you can use this one-liner. 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 +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 && curl -sL "https://github.com/Aloxion/chewed-gum/archive/refs/tags/${LATEST_TAG}.tar.gz" | tar -xzf - --strip-components=1 -C $HOME/chewed-gum && chmod +x $HOME/chewed-gum/main.sh && (grep -q 'export PATH=$HOME/chewed-gum:$PATH' ~/.zshrc || echo 'export PATH=$HOME/chewed-gum:$PATH' >> ~/.zshrc) && source ~/.zshrc ``` ### Downloade specifc tag Remember, to replace \, with the actual version you want to use. ```sh -curl -sL "https://github.com/Aloxion/chewed-gum/archive/refs/tags/.tar.gz" | tar -xzf - --strip-components=1 -C $HOME/chewed-gum- +curl -sL "https://github.com/Aloxion/chewed-gum/archive/refs/tags/.tar.gz" | tar -xzf - --strip-components=1 -C $HOME/chewed-gum ``` ### 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 +chmod +x $HOME/chewed-gum/main.sh ``` \ No newline at end of file