Page 3 of 3

Re: A great Linux, the second one I feel comfortable with!

Posted: Wed Sep 26, 2018 5:09 pm
by fehlix
@davemx,

I'll come back to your script above later. I've just slightly updated the brinstaller.sh,
which now includes the two libs you recognized missing.
Guess what, those two already have been mentioned with that
long installer log which we might have overlooked.

Code: Select all

#!/bin/bash
# set -x
# brinstaller.sh
# by fehlix,  2016 -2018
# helper script to fetch'n'install latest Brother printer driver
# 
# New Brother-Installer-Version: 27.12.2017 Version 2.2.0-1
# changes: 
# 24.09.2018 - updated to
#    new Brother-Installer-Version: 13.09.2018 Version 2.2.1-1
# 25.09.2018 - added missing 32bit-libs, thanks to davemx
#              lib32z1 lib32ncurses5
BRDATE="13-09-2018"
BRVERS="2.2.1-1"
# http://download.brother.com/welcome/dlf006893/linux-brprinter-installer-2.2.1-1.gz
# SHA256SUM
# 4bca9b72ea14b8ffe4a5276e0b881d64f1cb5b7b29bcf06869d2cad90bd95bff  linux-brprinter-installer-2.2.1-1.gz

function usage() {
cat<<USAGE

	Usage: $0 [Brother-Printer-Model]

	This helper script will fetch and install latest 
	Brother printer-installer version $BRVERS dated $BRDATE
	Pass Brother-Model parameter or type at prompt
	like HL-L6400DW, MFC-L9570CDW, DCP-135C

USAGE
}
ME="${0##*/}"
BROTHER="$1"
[ -z "$BROTHER" ] && read -p 'Please enter Brother Model : ' BROTHER
[ -z "$BROTHER" ] && usage && exit 1;
read -p "Ready to fetch and install Brother Model '$BROTHER' (Y/n) :" OK
[ -z "$OK" -o "$OK" = "Y" -o "$OK" = "y" ] || { echo "Abborting $0";  exit 1; }

# set -x
chksum=sha256sum
CHKSUM="4bca9b72ea14b8ffe4a5276e0b881d64f1cb5b7b29bcf06869d2cad90bd95bff"

# Please enter Brother Modell Type (e.g. HL-1030, MFC-L9570CDW, HL-L6400DW)
# HL-L6400DW

BRINS="linux-brprinter-installer-${BRVERS}"
BRIGZ=$BRINS.gz
BRURL="http://download.brother.com/welcome/dlf006893/$BRIGZ"
CHK=$BRIGZ.sha256

[ -f "$BRINS" -o -f $BRIGZ    ] || { echo wget $BRURL;  wget $BRURL; }
[ -f $BRIGZ  -a -f $CHK ] && rm -f $CHK
echo "$CHKSUM  $BRIGZ" > $CHK
$chksum -c $CHK || { echo "CHKSUM Error: abborting installer" && exit 1; }
 

[ -f $BRIGZ  -a ! -f $BRINS ] && gunzip -kv $BRIGZ
[ -f $BRINS ] && chmod +rx $BRINS && {
	sudo -k 
	sudo apt-get update
	[ "$(dpkg --print-architecture)" == "amd64" ] && {
		sudo apt-get install lib32z1 lib32ncurses5
	}	
	sudo ./$BRINS "$BROTHER"  
	RET=$?
}
#
echo "$ME finished ..."
echo " "
read -p "Press any key to continue..."
exit $RET
Thanks
fehlix
:puppy:

Re: A great Linux, the second one I feel comfortable with!

Posted: Wed Sep 26, 2018 10:13 pm
by KBD
Very nice review!

Re: A great Linux, the second one I feel comfortable with!

Posted: Thu Sep 27, 2018 5:36 pm
by davemx
fehlix wrote: Wed Sep 26, 2018 5:09 pm @davemx,

I'll come back to your script above later. I've just slightly updated the brinstaller.sh,
which now includes the two libs you recognized missing.
Guess what, those two already have been mentioned with that
long installer log which we might have overlooked.
I don't think those other two libs are needed. I put them in an earlier post because I'd been to other sites and they were overkill to make sure the right ones are loaded. But your earlier script works just fine.