-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_duf.sh
executable file
·26 lines (26 loc) · 997 Bytes
/
install_duf.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
#to run this script go into the folder where it is then run: ./install_duf.sh
#
#sudo apt-get purge duf -y
cd /tmp
machine="$(uname -m)"
#
#wget https://github.com/muesli/duf/releases/download/v0.3.1/duf_0.3.1_linux_amd64.deb
#wget https://github.com/muesli/duf/releases/download/v0.5.0/duf_0.5.0_linux_armv6.deb
#
#
if [ "$machine" == "x86_64" ]; then
echo "x86_64 system!"
wget -q --show-progress https://github.com$(wget -q https://github.com/muesli/duf/releases/latest -O - | egrep '/.*/.*/duf_[0-9,_.-]{1,20}_linux_amd64.deb' -o | head -1) && sudo dpkg -i duf_*.deb
else
echo "no x86_64. checking if armv6l.."
if [ "$machine" == "armv6l" ]; then
echo "armv6l system!"
wget -q --show-progress https://github.com$(wget -q https://github.com/muesli/duf/releases/latest -O - | egrep '/.*/.*/duf_[0-9,_.-]{1,20}_linux_armv6.deb' -o | head -1) && sudo dpkg -i duf_*.deb
else
echo "no armv6l system."
exit
fi
fi
rm duf_*.deb
sudo apt-get install -f -y