generate.sh 440 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env bash
  2. set -e
  3. declare -a IN
  4. for ((i = 1; i < $#; i++)); do
  5. IN[$i]="${!i}"
  6. done
  7. OUT="$(readlink -f "${!#}")"
  8. for S in "${IN[@]}"; do (
  9. cd "$(dirname "$S")"
  10. NAME="$(basename "$S")"
  11. IFS='
  12. '
  13. for FILE in $(find "$NAME" -type f); do
  14. D="$(dirname "$FILE")"
  15. mkdir -p "$OUT/$D"
  16. (cd "$GLUONDIR"; scripts/configure.pl scripts/generate.pl) < "$FILE" > "$OUT/$FILE"
  17. chmod --reference="$FILE" "$OUT/$FILE"
  18. done
  19. ); done