Files
wehub-resource-sync 7254f7b4d1
Build / Build (macos-latest) (push) Has been cancelled
Build / Build (ubuntu-latest) (push) Has been cancelled
Build / Build (windows-latest) (push) Has been cancelled
Build / Analyze (javascript) (push) Has been cancelled
Build / Analyze (python) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:37:45 +08:00

34 lines
968 B
Bash
Executable File

#!/bin/bash
set -e
pushd $(cd $(dirname ${0})/..; pwd) > /dev/null
clean() {
echo "armnn clean"
rm -rf ./third_party/source/armnn
}
sync() {
echo "armnn sync"
mkdir -p "./third_party/source/armnn/src/armnnSerializer"
curl --silent --show-error --location --output "./third_party/source/armnn/src/armnnSerializer/ArmnnSchema.fbs" "https://github.com/ARM-software/armnn/raw/main/src/armnnSerializer/ArmnnSchema.fbs"
}
schema() {
echo "armnn schema"
[[ $(grep -U $'\x0D' ./source/armnn-schema.js) ]] && crlf=1
node ./tools/flatc.js --text --root armnn --out ./source/armnn-schema.js ./third_party/source/armnn/src/armnnSerializer/ArmnnSchema.fbs
if [[ -n ${crlf} ]]; then
unix2dos --quiet --newfile ./source/armnn-schema.js ./source/armnn-schema.js
fi
}
while [ "$#" != 0 ]; do
command="$1" && shift
case "${command}" in
"clean") clean;;
"sync") sync;;
"schema") schema;;
esac
done