Files
SimpleLinux/scripts/duf_bin.sh
T

27 lines
871 B
Bash

#!/bin/bash
. ./scripts/colors.sh
. ./scripts/funcs.sh
. ./scripts/config.sh
duf_bin() {
pkgname=duf
pkgver=0.9.1
printf "$GREEN** Building and installing ${pkgname}\n$RESET"
[ -d $build/${pkgname} ] && return 0
mkdir $build/${pkgname}
cd $build/${pkgname}
if [ "${ARCH}" = "arm64" ] || [ "${ARCH}" = "x86_64" ]; then
wget https://github.com/muesli/duf/releases/download/v${pkgver}/${pkgname}_${pkgver}_linux_${ARCH}.tar.gz
check $? "Download ${pkgname}"
fi
if [ "${ARCH}" = "arm" ]; then
wget https://github.com/muesli/duf/releases/download/v${pkgver}/${pkgname}_${pkgver}_linux_${ARCH}v7.tar.gz
check $? "Download ${pkgname}"
fi
tar -xvf ${pkgname}_${pkgver}_linux*.tar.gz
check $? "Extract ${pkgname}"
cp -v duf $rootfspath/usr/bin/
check $? "Installing to rootfs ${pkgname}"
}