libfuse2.sh 619 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env bash
  2. LIB=libfuse2
  3. # CREATE THE FOLDER
  4. mkdir /opt/$LIB
  5. cd /opt/$LIB
  6. # ADD THE REMOVER
  7. echo '#!/bin/sh
  8. rm -R -f /opt/'$LIB' /usr/local/lib/libfuse*' >> /opt/$LIB/remove
  9. chmod a+x /opt/$LIB/remove
  10. # DOWNLOAD THE ARCHIVE
  11. mkdir tmp
  12. cd ./tmp
  13. 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)
  14. wget http://ftp.debian.org/debian/pool/main/f/fuse/"$LIBFUSE2_DEB"
  15. ar x ./*.deb
  16. tar fx ./data.tar.xz
  17. cd ..
  18. mkdir -p /usr/local/lib
  19. mv ./tmp/lib/*/libfuse* /usr/local/lib/
  20. rm -R -f ./tmp
  21. ldconfig