mirror of
https://github.com/tendermint/tendermint.git
synced 2026-02-06 12:00:44 +00:00
12 lines
324 B
Bash
Executable File
12 lines
324 B
Bash
Executable File
#!/usr/bin/sh
|
|
set -eo pipefail
|
|
|
|
# This script appends the "option go_package" proto option to the file located at $FNAME
|
|
|
|
|
|
FNAME=$1
|
|
MODNAME=$(echo $2| sed 's/\//\\\//g')
|
|
PACKAGE="$(dirname $FNAME | cut -c 2- | sed 's/\//\\\//g')"
|
|
|
|
sed -i "s/\(package tendermint.*\)/\1\n\noption go_package = \"$MODNAME$PACKAGE\";/g" $FNAME
|