Step-by-step Automation Guide to Install the Latest Version of age / Rage on Linux
Introduction
Rage is a simple, secure, and modern encryption tool with small explicit keys, no config options, and UNIX-style composability. This guide will show you how to install the latest version of Rage on your Linux machine.
Prerequisites
Before you start, make sure you have the following installed on your system:
curl
: This is a command-line tool for transferring data with URLs.jq
: This is a lightweight and flexible command-line JSON processor.wget
: This is a free utility for non-interactive download of files from the web.dpkg
: This is a package manager for Debian-based systems.
You can install them using the command:
sudo apt-get install curl jq wget dpkg
Note: If you're not using a Debian-based system, replace apt-get
with your package manager (like yum
or dnf
for Fedora-based systems).
Steps
Step 1: Create a Bash Script
Create a bash script with the following content:
#!/bin/bash
# Specify the directory where the .deb file will be saved
dir="/path/to/your/directory"
# Fetch the latest version tag from the GitHub API
latest_version=$(curl --silent "https://api.github.com/repos/str4d/rage/releases/latest" | jq -r .tag_name)
# Define the URL for the .deb file
url="https://github.com/str4d/rage/releases/download/${latest_version}/rage_${latest_version}_amd64.deb"
# Define the path for the .deb file
file="${dir}/rage_${latest_version}_amd64.deb"
# Download the .deb file
wget -O $file $url
# Install the .deb file
sudo dpkg -i $file
Please replace "/path/to/your/directory"
with the actual directory where you want the .deb file to be saved.
Step 2: Run the Script
Once you've created the script, make it executable with the following command:
chmod +x /path/to/your/script.sh
Replace "/path/to/your/script.sh"
with the path to your script.
Then, you can run the script with this command:
/path/to/your/script.sh
Again, replace "/path/to/your/script.sh"
with the path to your script.
Conclusion
That's it! The script will automatically download and install the latest version of Rage for you. If a new version is released, you can just run the script again to update to the latest version.
Remember to run the script with sufficient permissions to install software on your system (typically, you would run such a script as an administrator).