Skip to content

Instantly share code, notes, and snippets.

@twitchyliquid64
Last active May 31, 2020 08:25
Show Gist options
  • Save twitchyliquid64/72a0ef3d96ad12a61d3f82dfd4367b5e to your computer and use it in GitHub Desktop.
Save twitchyliquid64/72a0ef3d96ad12a61d3f82dfd4367b5e to your computer and use it in GitHub Desktop.
Installs BOSSA 1.9.1 on debian based systems.
#!/bin/bash
# Installs BOSSA 1.9.1 from source on debian based systems.
# Author: twitchyliquid64
#
# Copyright (c) 2019 twitchyliquid64. All rights reserved.
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
URL='https://github.com/shumatech/BOSSA/archive/1.9.1.tar.gz'
SHA256='ca650455dfa36cbd029010167347525bea424717a71a691381c0811591c93e72'
BUILD_DIR='/tmp/bossa-tmp'
sudo apt-get install -y libwxgtk3.0-dev libreadline-dev
wget $URL -O /tmp/bossa1.9.1.tar.gz
if [ $? -ne 0 ]; then
echo "Failed to download ${URL}"
exit 1
fi
HSH=$(sha256sum /tmp/bossa1.9.1.tar.gz | cut -d" " -f1)
if [ "${HSH}" != "${SHA256}" ]; then
echo "Hash check failed!"
exit 1
else
echo "Hash matched."
fi
echo "Extracting ${URL##*/}"
mkdir -pv $BUILD_DIR
tar -C $BUILD_DIR --strip-components=1 -xzf /tmp/bossa1.9.1.tar.gz
PREVIOUS_WD=$(pwd)
cd $BUILD_DIR
sed -i "s/^VERSION=.*/VERSION=1.9.1/g" Makefile
make
if [ $? -ne 0 ]; then
echo "Failed to build BOSSA!!"
cd $PREVIOUS_WD
rm -rf $BUILD_DIR
exit 1
fi
make install
sudo cp -v bin/{bossa,bossac,bossash} /usr/bin
cd $PREVIOUS_WD
rm -rf $BUILD_DIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment