Bash Utils (Deprecated)
With the deprecation of KIRA Manager (KM), Bash Utils is also being deprecated. This documentation remains for internal purposes or for those who still prefer using Bash Utils locally.
The prerequisite to securely install BU is COSIGN that will guarantee the integrity of the files you want to download, you MUST install it before proceeding.
Bash Utils (BU) is a lightweight bash script designed to simplify interactions with SEKAI and KM and streamline other bash-related tasks. This guide provides two installation methods: a simplified setup and a secure setup with signature verification.
Secure Installation
Ensure KIRA Public Key Availability
Check if the KIRA public key is already saved. If not, follow the COSIGN page to install COSIGN and save KIRA’s cosign public key.
KIRA_COSIGN_PUB=/usr/keys/kira-cosign.pub
if [ ! -f "$KIRA_COSIGN_PUB" ]; then
echo "ERROR: KIRA public key not found. Please refer to the COSIGN setup guide to save the key."
exit 1
fi
Download Bash Utils and Signature
TOOLS_VERSION="v0.3.42" # Specify the BU version
FILE_NAME="bash-utils.sh"
UBUNTU_AGENT="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36"
cd /tmp
rm -rfv ./$FILE_NAME ./${FILE_NAME}.sig
wget --user-agent="$UBUNTU_AGENT" "https://github.com/KiraCore/tools/releases/download/$TOOLS_VERSION/$FILE_NAME" -O ./$FILE_NAME
wget --user-agent="$UBUNTU_AGENT" "https://github.com/KiraCore/tools/releases/download/$TOOLS_VERSION/${FILE_NAME}.sig" -O ./${FILE_NAME}.sig
Verify the Script
Use the COSIGN tool to verify the downloaded script:
cosign verify-blob \
--key "$KIRA_COSIGN_PUB" \
--signature "/tmp/${FILE_NAME}.sig" \
"/tmp/$FILE_NAME" \
--insecure-ignore-tlog --insecure-ignore-sct
Install Bash Utils
Run the installer script after verification:
chmod +x ./$FILE_NAME
./$FILE_NAME bashUtilsSetup && ./etc/profile
Verify Installation
Confirm the installed version of Bash Utils:
bu bashUtilsVersion