Files
SimpleLinux/scripts/duf_bin.sh
T
2026-03-05 17:18:16 +07:00

27 lines
860 B
Bash

#!/bin/bash
. ./scripts/colors.sh
. ./scripts/funcs.sh
. ./scripts/config.sh
duf_bin() {
pkgname=duf
pkgver=0.9.1
print_info "** Building and installing ${pkgname}"
[ -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 -xf ${pkgname}_${pkgver}_linux*.tar.gz
check $? "Extract ${pkgname}"
cp -v duf $rootfspath/usr/bin/
check $? "Installing to rootfs ${pkgname}"
}