Blob Blame History Raw
#!/bin/bash
# Copyright 2011 - 2023 B. Persson, Bjorn@Rombobeorn.se
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice and
# this notice are preserved. This file is offered as-is, without any warranty.

# Provide exec_prefix, bindir, libexecdir, includedir and GNAT_project_dir to
# this script as environment variables.

for file in macros.gnat directories.gpr ; do
    sed "--expression=s,@exec_prefix@,${exec_prefix},g" \
        "--expression=s,@bindir@,${bindir},g" \
        "--expression=s,@libexecdir@,${libexecdir},g" \
        "--expression=s,@includedir@,${includedir},g" \
        "--expression=s,@GNAT_project_dir@,${GNAT_project_dir},g" \
        < "${file}.in" \
        > "${file}"
done