gluon/scripts/generate.sh

28 lines
440 B
Bash
Raw Normal View History

2013-09-28 16:39:32 +00:00
#!/usr/bin/env bash
set -e
2013-09-28 16:39:32 +00:00
declare -a IN
2013-09-28 16:39:32 +00:00
for ((i = 1; i < $#; i++)); do
IN[$i]="${!i}"
done
OUT="$(readlink -f "${!#}")"
for S in "${IN[@]}"; do (
cd "$(dirname "$S")"
NAME="$(basename "$S")"
IFS='
'
for FILE in $(find "$NAME" -type f); do
D="$(dirname "$FILE")"
mkdir -p "$OUT/$D"
2013-09-30 17:04:35 +00:00
(cd "$GLUONDIR"; scripts/configure.pl scripts/generate.pl) < "$FILE" > "$OUT/$FILE"
2013-09-28 16:39:32 +00:00
chmod --reference="$FILE" "$OUT/$FILE"
done
); done