libfuse2.sh
1 #!/usr/bin/env bash 2 3 LIB=libfuse2 4 5 # CREATE THE FOLDER 6 mkdir /opt/$LIB 7 cd /opt/$LIB 8 9 # ADD THE REMOVER 10 echo '#!/bin/sh 11 rm -R -f /opt/'$LIB' /usr/local/lib/libfuse*' >> /opt/$LIB/remove 12 chmod a+x /opt/$LIB/remove 13 14 # DOWNLOAD THE ARCHIVE 15 mkdir tmp 16 cd ./tmp 17 18 LIBFUSE2_DEB=$(wget -q http://ftp.debian.org/debian/pool/main/f/fuse/ -O - | grep -Po '(?<=href=")[^"]*' | sort | grep -v exp | grep amd64 | grep "libfuse2_" | tail -1) 19 wget http://ftp.debian.org/debian/pool/main/f/fuse/"$LIBFUSE2_DEB" 20 ar x ./*.deb 21 tar fx ./data.tar.xz 22 cd .. 23 mkdir -p /usr/local/lib 24 mv ./tmp/lib/*/libfuse* /usr/local/lib/ 25 rm -R -f ./tmp 26 ldconfig