Created
July 22, 2016 19:45
-
-
Save perseoq/23989d82d03be05c5c76f5789a873eff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
URL="https://github.com/gkovacs/pdfocr.git" | |
INSTALL_DIR="/opt/pdfocr" | |
INSTALL_PREFIX="/usr/local" | |
if ! type git > /dev/null 2>&1; then | |
echo "'git' is not found. Install it with the command below and try again" | |
echo | |
echo " $ sudo apt-get install git" | |
echo | |
exit 1 | |
fi | |
echo "Installing required packages..." | |
sudo apt-get install ruby \ | |
exactimage \ | |
tesseract-ocr | |
sudo git clone $URL "$INSTALL_DIR" | |
sudo mkdir -p "$INSTALL_PREFIX/bin" | |
sudo mkdir -p "$INSTALL_PREFIX/share/man/man1" | |
sudo ln -sf "$INSTALL_DIR/pdfocr.rb" "$INSTALL_PREFIX/bin/pdfocr" | |
sudo ln -sf "$INSTALL_DIR/pdfocr.1" "$INSTALL_PREFIX/share/man/man1/pdfocr.1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment