#!/bin/sh
# Pt-web/src/app-root/scripts/Factory/Read_EEPROM_mk4.sh
# 
#  Copyright: ©2012, Güralp Systems Ltd.
#  Author: Laurence Withers <lwithers@guralp.com>
#  License: GPLv3
#

set -ex

OUTPUT_DIR="$1"

cd "${OUTPUT_DIR}"
eeprog -16 -f -q -r 0:8192 /dev/i2c-0 0x50 > "eeprom.tar"
tar -xf "eeprom.tar"
