#!/bin/bash DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")" function error { echo -e "\\e[91m$1\\e[39m" exit 1 } #change version to latest each time VER="1.0.7" cd $HOME || error "Failed to change directory to $HOME!" git clone https://gitlab.com/bztsrc/usbimager.git || error "Failed to clone USBImager repo!" cd usbimager/ || error "Failed to entr usbimager repo folder!" git checkout $VER || error "Failed to checkout version $VER!" cd src/ USE_LIBUI=yes make -j$(nproc) || error "Failed to compile usbimager!" make deb cd .. sudo apt install -fy ./usbimager*arm64.deb cd .. rm -rf usbimager/