path_replacer.sh.in 450 B

123456789101112131415161718
  1. #!/bin/sh
  2. #
  3. # This script replaces @prefix@ and @localstatedir@ variables with their
  4. # actual content. Usage:
  5. #
  6. # ./path_replacer.sh input-file.in output-file
  7. prefix=@prefix@
  8. sysconfdir=@sysconfdir@
  9. localstatedir=@localstatedir@
  10. echo "Replacing \@localstatedir\@ with ${localstatedir}"
  11. echo "Input file: $1"
  12. echo "Output file: $2"
  13. sed -e "s+\@localstatedir\@+${localstatedir}+g; s+\@prefix@+${prefix}+g; s+\@sysconfdir@+${sysconfdir}+g" $1 > $2