Fix USBImager to use precompiled release

pull/891/head
Botspot 4 years ago
parent a9e36966c8
commit 734380230b

@ -10,15 +10,19 @@ function error {
#change version to latest each time #change version to latest each time
VER="1.0.7" VER="1.0.7"
"${DIRECTORY}/pkg-install" "make" "$(dirname "$0")" || exit 1 rm -rf ~/usbimager
mkdir -p ~/usbimager
git clone https://gitlab.com/bztsrc/usbimager.git || error "Failed to clone USBImager repo!" cd ~/usbimager
cd usbimager/ || error "Failed to entr usbimager repo folder!"
git checkout $VER || error "Failed to checkout version $VER!" echo "Downloading..."
cd src/ wget -qO $(pwd)/usbimager.zip https://gitlab.com/bztsrc/usbimager/raw/binaries/usbimager_${VER}-armv7l-linux-x11.zip || error "Failed to download usbimager.zip!"
USE_LIBUI=yes make -j$(nproc) || error "Failed to compile usbimager!"
make deb || error "Failed to make deb!" echo "Extracting..."
cd .. unzip $(pwd)/usbimager.zip || error "Failed to extract!"
sudo apt install -fy ./usbimager*armhf.deb rm -f $(pwd)/usbimager.zip
cd .. cd ~/
rm -rf usbimager/
echo "Copying files..."
sudo cp -av /home/pi/usbimager/* /usr || error "Failed to copy files to /usr!"
rm -rf ~/usbimager

@ -10,15 +10,19 @@ function error {
#change version to latest each time #change version to latest each time
VER="1.0.7" VER="1.0.7"
"${DIRECTORY}/pkg-install" "make" "$(dirname "$0")" || exit 1 rm -rf ~/usbimager
mkdir -p ~/usbimager
git clone https://gitlab.com/bztsrc/usbimager.git || error "Failed to clone USBImager repo!" cd ~/usbimager
cd usbimager/ || error "Failed to entr usbimager repo folder!"
git checkout $VER || error "Failed to checkout version $VER!" echo "Downloading..."
cd src/ wget -qO $(pwd)/usbimager.zip https://gitlab.com/bztsrc/usbimager/raw/binaries/usbimager_1.0.7-aarch64-linux-x11.zip || error "Failed to download usbimager.zip!"
USE_LIBUI=yes make -j$(nproc) || error "Failed to compile usbimager!"
make deb || error "Failed to make deb!" echo "Extracting..."
cd .. unzip $(pwd)/usbimager.zip || error "Failed to extract!"
sudo apt install -fy ./usbimager*arm64.deb rm -f $(pwd)/usbimager.zip
cd .. cd ~/
rm -rf usbimager/
echo "Copying files..."
sudo cp -av /home/pi/usbimager/* /usr || error "Failed to copy files to /usr!"
rm -rf ~/usbimager

@ -7,5 +7,14 @@ function error {
exit 1 exit 1
} }
sudo apt purge usbimager -y || error 'Failed to uninstall USBImager!' rm -rf ~/usbimager
files="/usr/bin/usbimager
/usr/share/man/man8/usbimager.8.gz
/usr/share/icons/hicolor/64x64/apps/usbimager.png
/usr/share/icons/hicolor/128x128/apps/usbimager.png
/usr/share/icons/hicolor/32x32/apps/usbimager.png
/usr/share/icons/hicolor/16x16/apps/usbimager.png
/usr/share/applications/usbimager.desktop"
echo "$files" | sudo xargs rm -f

Loading…
Cancel
Save