Install Script

Johannes Baiter's Spreads and SpreadPi are the latest control systems and postprocessors for DIY scanning. http://spreads.readthedocs.org

Moderator: peterZ

Post Reply
boredland
Posts: 42
Joined: 08 Jan 2014, 07:30
Number of books owned: 0
Country: Germany

Install Script

Post by boredland »

I made a full update of my install script:
https://github.com/boredland/spreads-deploy

From the ./setup.sh I offer three Setup-Methods:
[1] Standalone
[2] Processor
[3] Full

For Full and Processor the tools are compiled from source. That takes quite a long time, but is therefore quite platform-idependent.
I think in the area of the Standalone-Devices there a some things missing (udev rules etc.), but thats only a matter of time: help is kindly appreciated.

Yours
Boredland
Stychokiller
Posts: 4
Joined: 22 Sep 2014, 00:23
E-book readers owned: 0
Number of books owned: 500
Country: USA

Re: Install Script

Post by Stychokiller »

Had to add the following if [] fi to the tesseract.sh code:
if [ ! -d /usr/local/share/tessdata ]; then
sudo mkdir /usr/local/share/tessdata
fi


## check if the trainingfiles are there and if not add them from git
if [[ ! -d tessdata ]]
then
git clone https://code.google.com/p/tesseract-ocr.tessdata/ tessdata
fi

# My addtion goes here... [JTS]
if [ ! -d /usr/local/share/tessdata ]; then
sudo mkdir /usr/local/share/tessdata
fi
# NEVER assume a directory already exists! [JTS] :o
sudo cp tessdata/* /usr/local/share/tessdata
Stychokiller
Posts: 4
Joined: 22 Sep 2014, 00:23
E-book readers owned: 0
Number of books owned: 500
Country: USA

Re: Install Script

Post by Stychokiller »

Had to add the following sudo to the scanner_links_rules.sh:

# almost all files in /etc/ require root privileges...
sudo rm -f /etc/udev/rules.d/70-persistent-net.rules

sudo sh -c "echo 'ACTION=="add", SUBSYSTEM=="usb", MODE:="666"' > /etc/udev/rules.d/99-usb.rules"
sudo sed -i -e 's/KERNEL\!="eth\*|/KERNEL\!="/' /lib/udev/rules.d/75-persistent-net-generator.rules

# How did you ever get this to work???
rm -f /etc/udev/rules.d/70-persistent-net.rules


if [ "$(stat -c %d:%i /)" != "$(stat -c %d:%i /proc/1/root/.)" ]; then
echo "We are chrooted!"
else
sudo udevadm control --reload-rules
fi
Stychokiller
Posts: 4
Joined: 22 Sep 2014, 00:23
E-book readers owned: 0
Number of books owned: 500
Country: USA

Re: Install Script

Post by Stychokiller »

Cannot figure out how to get around this installation error:

Downloading/unpacking piggyphoto>=0.1 (from spreads[web,chdkcamera,hidtrigger,gphoto2camera])
Could not find any downloads that satisfy the requirement piggyphoto>=0.1 (from spreads[web,chdkcamera,hidtrigger,gphoto2camera])
Cleaning up...
No distributions at all found for piggyphoto>=0.1 (from spreads[web,chdkcamera,hidtrigger,gphoto2camera]) :shock:
Storing debug log for failure in /home/myHomeDir/.pip/pip.log

Yousa gotta fixin deez one!
duerig
Posts: 388
Joined: 01 Jun 2014, 17:04
Number of books owned: 1000
Country: United States of America

Re: Install Script

Post by duerig »

The script referred to is the piggyphoto library here:

https://github.com/alexdu/piggyphoto

I've installed it in the past, but cannot now remember how I did this. Try fetching the repository and seeing if you can install it that way. I'll take a look myself when I get a chance this weekend.
boredland
Posts: 42
Joined: 08 Jan 2014, 07:30
Number of books owned: 0
Country: Germany

Re: Install Script

Post by boredland »

# My addtion goes here... [JTS]
if [ ! -d /usr/local/share/tessdata ]; then
sudo mkdir /usr/local/share/tessdata
fi
# NEVER assume a directory already exists! [JTS] :o
sudo cp tessdata/* /usr/local/share/tessdata
I think you're wrong, even though this does no harm. The Tesseract Makefile does, and that I am quite sure, create the tessdata directory automatically.

Code: Select all

sudo rm -f /etc/udev/rules.d/70-persistent-net.rules
You're right. I think I might never have tried that part on a freshly installed system. On my system the udev rule didn't apply properly yet, but that perhaps is a kernel problem.

Sadly I never had this piggyphoto-error. Perhaps you can just post it on the spreads git, quite sure Johannes did add it newerly.

Furthermore:
Could you please file issues on my github for this in the future? Working down several errors in a forum is quite hard to follow up..
boredland
Posts: 42
Joined: 08 Jan 2014, 07:30
Number of books owned: 0
Country: Germany

Re: Install Script

Post by boredland »

I deleted this project since noone was using it.
Post Reply