Skip to content

Commit

Permalink
Added macOS compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhann committed Feb 25, 2021
1 parent dc71474 commit e1a0e6e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ to process and return results, and `recode` to unescape html.
* [recode](https://github.com/rrthomas/recode) - Charset converter tool and library.
* [jq](https://github.com/stedolan/jq) - Command-line JSON processor.

### macOS specific requirements

* [gnu-sed](https://www.gnu.org/software/sed/) - sed (stream editor) is a non-interactive command-line text editor

## Installation

### cURL
Expand All @@ -50,6 +54,14 @@ Tuxi is available as the [`tuxi-git`](https://aur.archlinux.org/packages/tuxi-gi
$ yay -S tuxi-git
```

### macOS
Tuxi dependencies are available as [`brew`](https://brew.sh) Formulae. cURL **tuxi** to your **$PATH** and give execute permissions.
```sh
brew install pup recode gnu-sed
sudo curl -sL "https://raw.githubusercontent.com/Bugswriter/tuxi/main/tuxi" -o /usr/local/bin/tuxi
sudo chmod +x /usr/local/bin/tuxi
```

## Usage

```sh
Expand Down
8 changes: 8 additions & 0 deletions tuxi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ LANGUAGE=""
##### Functions #####
###############################

sed () {
if [[ "$OSTYPE" == "darwin"* ]]; then
gsed "${@}"
else
sed "${@}"
fi
}

help_text () {
printf "%bUsage:%b tuxi %b[options]%b %bquery%b\n" "$G" "$N" "$Y" "$N" "$M" "$N"
printf "\n"
Expand Down

0 comments on commit e1a0e6e

Please sign in to comment.