1.9 KiB
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
# Haste-It Installation Guide
This guide provides instructions for installing the `haste-it` binary on various systems based on the architecture.
## 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:
```bash
bash install.sh
This script will automatically detect your system's architecture, choose the correct binary from the dist
directory, and install it.
Configuration
After installation, set the environment variable for your Hastebin server by adding the following to your .bashrc
, .zshrc
, or equivalent shell configuration file:
export HASTEBIN_URL="https://your-hastebin-server.com"
Replace https://your-hastebin-server.com
with the URL of your Hastebin server.
Usage
After installation and configuration, you can use haste-it
by simply typing:
haste-it [file]
If no file is specified, haste-it
will read from standard input.
### Installation Script (`install.sh`)
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):
sudo ./install.sh
Set the environment variable as described in the README.