Update README.md
This commit is contained in:
parent
1f72163401
commit
b4f4c344c0
60
README.md
60
README.md
|
@ -1,59 +1,49 @@
|
|||
To help you install the `haste-it` binaries efficiently on various architectures, I'll provide you with a README guide that includes bash one-liners for installation. Additionally, I'll include a simple bash script for automatic installation and setting up the environment variable for the Hastebin server URL.
|
||||
|
||||
### README.md Content
|
||||
|
||||
```markdown
|
||||
# Haste-It Installation Guide
|
||||
|
||||
This guide provides instructions for installing the `haste-it` binary on various systems based on the architecture.
|
||||
Welcome to the installation guide for Haste-It, a tool for uploading content to a Hastebin server.
|
||||
|
||||
## Installation
|
||||
|
||||
Before installing, ensure that the binary for your architecture has been built and is located in the `dist` directory.
|
||||
|
||||
Run the following command to install the `haste-it` binary:
|
||||
Install Haste-It by executing the following command in your terminal:
|
||||
|
||||
```bash
|
||||
bash install.sh
|
||||
curl -sSL https://git.nixc.us/Nixius/haste-it/raw/branch/main/install.sh | sudo bash
|
||||
```
|
||||
|
||||
This script will automatically detect your system's architecture, choose the correct binary from the `dist` directory, and install it.
|
||||
This command fetches the `install.sh` script directly and runs it, handling the installation of the correct binary for your system's architecture.
|
||||
|
||||
## Configuration
|
||||
|
||||
After installation, set the environment variable for your Hastebin server by adding the following to your `.bashrc`, `.zshrc`, or equivalent shell configuration file:
|
||||
After installation, configure the environment variable for your Hastebin server by adding the following line to your shell's configuration file (e.g., `.bashrc`, `.zshrc`):
|
||||
|
||||
```bash
|
||||
export HASTEBIN_URL="https://your-hastebin-server.com"
|
||||
```
|
||||
|
||||
Replace `https://your-hastebin-server.com` with the URL of your Hastebin server.
|
||||
Replace `https://your-hastebin-server.com` with the actual URL of your Hastebin server.
|
||||
|
||||
Understood, let's adjust the "Usage" section of the README to clearly explain that the `haste-it` tool can accept text input not only from a file but also directly from a piped string, which enhances its flexibility for different use cases. Here’s the revised "Usage" section to reflect this capability:
|
||||
|
||||
## Usage
|
||||
|
||||
After installation and configuration, you can use `haste-it` by simply typing:
|
||||
Once installed and configured, you can use Haste-It in several ways:
|
||||
|
||||
```bash
|
||||
haste-it [file]
|
||||
```
|
||||
1. **From a File**: To upload text from a file, simply use the command:
|
||||
```bash
|
||||
haste-it [file]
|
||||
```
|
||||
Replace `[file]` with the path to the file you want to upload.
|
||||
|
||||
If no file is specified, `haste-it` will read from standard input.
|
||||
```
|
||||
2. **From Standard Input**: If no file is specified, `haste-it` can read from standard input. This allows you to pipe data directly into the command. For example:
|
||||
```bash
|
||||
echo "Hello, world!" | haste-it
|
||||
```
|
||||
or:
|
||||
```bash
|
||||
cat mytext.txt | haste-it
|
||||
```
|
||||
This is useful for integrating `haste-it` into scripts or workflows where you want to quickly upload output from other commands.
|
||||
|
||||
### Installation Script (`install.sh`)
|
||||
## Note
|
||||
|
||||
Here's a simple bash script to automate the installation process. This script will detect the architecture, find the appropriate binary in the `dist` directory, and install it to `/usr/local/bin`.
|
||||
|
||||
## Instructions for Use
|
||||
|
||||
Ensure that install.sh has execute permissions:
|
||||
|
||||
```bash
|
||||
chmod +x install.sh
|
||||
```
|
||||
Run the script with sufficient privileges (as it installs to /usr/local/bin):
|
||||
|
||||
```bash
|
||||
sudo ./install.sh
|
||||
```
|
||||
Set the environment variable as described in the README.
|
||||
This installation is intended as a one-off setup. No updates or maintenance will be provided.
|
Loading…
Reference in New Issue