aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/tools/tlv_eeprom/eeprom-wrapper
blob: 4e7c7dbfa7025e164099622bbcb866bd9d3f7392 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

set -e

util=$(basename $0)
if [ $# -ge 1 ]; then
    symbol=$1
    if [ -n "$symbol" ] && [ "${symbol:(-7)}" != "_eeprom" ]; then
        symbol="${symbol}_eeprom"
    fi
    path=$(eeprom-path $symbol)
fi
$util-core $path ${*:2} 2> >( sed "s!-core <\(eeprom\|output_file\)>! <symbol>!" >&2)