Fix USBImager to use precompiled release

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

@ -10,15 +10,19 @@ function error {
#change version to latest each time
VER="1.0.7"
"${DIRECTORY}/pkg-install" "make" "$(dirname "$0")" || exit 1
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 || error "Failed to make deb!"
cd ..
sudo apt install -fy ./usbimager*armhf.deb
cd ..
rm -rf usbimager/
rm -rf ~/usbimager
mkdir -p ~/usbimager
cd ~/usbimager
echo "Downloading..."
wget -qO $(pwd)/usbimager.zip https://gitlab.com/bztsrc/usbimager/raw/binaries/usbimager_${VER}-armv7l-linux-x11.zip || error "Failed to download usbimager.zip!"
echo "Extracting..."
unzip $(pwd)/usbimager.zip || error "Failed to extract!"
rm -f $(pwd)/usbimager.zip
cd ~/
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
VER="1.0.7"
"${DIRECTORY}/pkg-install" "make" "$(dirname "$0")" || exit 1
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 || error "Failed to make deb!"
cd ..
sudo apt install -fy ./usbimager*arm64.deb
cd ..
rm -rf usbimager/
rm -rf ~/usbimager
mkdir -p ~/usbimager
cd ~/usbimager
echo "Downloading..."
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!"
echo "Extracting..."
unzip $(pwd)/usbimager.zip || error "Failed to extract!"
rm -f $(pwd)/usbimager.zip
cd ~/
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
}
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