#!/bin/bash
#set -x

#VERSION=8.95.1
VERSION=9.95.2
RELEASE=1
TARGET=/var/tmp/openboardview_${VERSION}-${RELEASE}_amd64.deb

wget -O ${TARGET} https://github.com/OpenBoardView/OpenBoardView/releases/download/${VERSION}/openboardview_${VERSION}-${RELEASE}_amd64.deb

sudo dpkg -i ${TARGET} && sudo apt-get -f install -y

## build from source
#sudo apt-get install git build-essential cmake libsdl2-dev libgtk-3-dev
#
#DEST=${1:-/space/code_repositories}/OpenBoardView
#
#git clone --recursive 'https://github.com/OpenBoardView/OpenBoardView' ${DEST}
#
#cd ${DEST}
#
#./build.sh
#
#cat <<EOF | sudo tee /tmp/OpenBoardView_usage.txt >/dev/null
#
#./bin/openboardview ...or... $ ./openboardview.sh
#
#Usage
#Ctrl-O: Open file select dialog
#
#w/a/s/d: pan viewport over board
#
#x: Reset zoom and center
#
#Mouse scroll, -/=: Zoom out/in
#
#Mouse click-hold-drag, Numeric pad up/down/left/right: pan viewport over board
#
#Numeric pad +/-: zoom board
#
#Numeric pad 5: Reset zoom and center
#
#Space, Middle mouse click: Flip board
#
#R/./Numpad-Del: Rotate clockwise
#
#,/Numpad-Ins: Rotate counter-clockwise
#
#/, Ctrl-F: Search
#
#ESC: Clear search results and selected parts
#
#p: Toggle pin display
#
#m: Mirror board across Y-axis
#
#L: Show net list
#
#K: Show part list
#EOF
#
#cat /tmp/OpenBoardView_usage.txt
