This commit fixes the following bugs in encode.sh and decode.sh:
- The use of BASH-extended syntax with /bin/sh
- The use of relative path in protoc input
It seems that latest protoc recognizes relative path, but this commit
revises scripts to use absolute path to improve compatibility.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
-#!/bin/sh
+#!/bin/bash
TOOLCHAIN_BASE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
TENSORFLOW_BASE="${TOOLCHAIN_BASE}/../../externals/tensorflow"
PROTOC="protoc"
-"${PROTOC}" --proto_path="${TENSORFLOW_BASE}" --decode=tensorflow.GraphDef tensorflow/core/framework/graph.proto
+"${PROTOC}" --proto_path="${TENSORFLOW_BASE}" --decode=tensorflow.GraphDef "${TENSORFLOW_BASE}/tensorflow/core/framework/graph.proto"
-#!/bin/sh
+#!/bin/bash
TOOLCHAIN_BASE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
TENSORFLOW_BASE="${TOOLCHAIN_BASE}/../../externals/tensorflow"
PROTOC="protoc"
-"${PROTOC}" --proto_path="${TENSORFLOW_BASE}" --encode=tensorflow.GraphDef tensorflow/core/framework/graph.proto
+"${PROTOC}" --proto_path="${TENSORFLOW_BASE}" --encode=tensorflow.GraphDef "${TENSORFLOW_BASE}/tensorflow/core/framework/graph.proto"