Files
RedBear-OS/include.sh
T
Alexander Theißen 484a05e8b3 Remove unnecessary escape from include.sh
The older bash version of macOS does not understand this escape
and actually creates directories with "\" in their name. After this
change it actually works with both versions.
2018-11-17 20:17:35 +01:00

21 lines
443 B
Bash
Executable File

#!/usr/bin/env bash
set -ex
include="$(realpath "$1")"
cbindgen="$(realpath cbindgen)"
for config in src/header/*/cbindgen.toml
do
dir="$(dirname "$config")"
name="$(basename "$dir")"
if [ "${name:0:1}" != "_" ]
then
header="$include/${name/_//}.h"
pushd "$dir"
cargo run --release --manifest-path "$cbindgen/Cargo.toml" -- \
-c cbindgen.toml -o "$header" mod.rs
popd
fi
done