Advertisement
hamacker

epson-printer-utility.sh

Dec 30th, 2020
1,588
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.43 KB | None | 0 0
  1. #! /bin/bash
  2.  
  3. # Run epson-printer-utility from epson-printer-utility_1.0.2-1lsb3.2_amd64.deb
  4. # using downloaded libqt4 libraries from previous Ubuntu version (not provided
  5. # in Ubuntu 20.04 "focal fossa"
  6. #
  7. # This downloads the deb files and extracts them in a libs directory in the
  8. # current directory, and then runs the utility
  9. #
  10. # Fix for:
  11. # epson-printer-utility: error while loading shared libraries: libQtCore.so.4: cannot open shared object file: No such file or directory
  12. # Originalmente este scri https://gist.github.com/derde/025a1cdbfadc3e56dc6a46093d922c32
  13. # Foi modificado por mim porque alguns links estavam desatualizados
  14. DEBS='
  15.    http://archive.ubuntu.com/ubuntu/pool/universe/q/qt4-x11/libqtgui4_4.8.7+dfsg-7ubuntu1_amd64.deb
  16.    http://archive.ubuntu.com/ubuntu/pool/universe/q/qt4-x11/libqtcore4_4.8.7+dfsg-7ubuntu1_amd64.deb
  17.    http://archive.ubuntu.com/ubuntu/pool/universe/n/nas/libaudio2_1.9.4-6build1_amd64.deb
  18. '
  19. cd `dirname $0`
  20. mkdir -p libs
  21. cd libs
  22.  
  23. echo "## `pwd`"
  24. if ! [ -f data.tar.zx ] ; then
  25.     for DEB in $DEBS; do
  26.         FILE="${DEB/*\/}"
  27.         [ -f "$FILE" ] && continue
  28.         echo "## download $DEB"
  29.         wget $DEB
  30.         echo "## extract $FILE"
  31.         ar x $FILE
  32.         tar -xJf data.tar.xz
  33.         rm control.tar.xz  data.tar.xz debian-binary
  34.     done
  35. fi
  36.  
  37. echo "## run epson-printer-utility with `pwd`"
  38. LD_LIBRARY_PATH=`pwd`/./usr/lib/x86_64-linux-gnu epson-printer-utility
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement