index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | build-aux/edit-script.sh.in | 33 |
diff --git a/build-aux/edit-script.sh.in b/build-aux/edit-script.sh.in new file mode 100644 index 00000000..3e3a1b6a --- /dev/null +++ b/build-aux/edit-script.sh.in @@ -0,0 +1,33 @@ +#!@BASH@ + +input=$1 +output=$2 +mode=$3 + +"@SED@" \ + -e "s|@rootdir[@]|@ROOTDIR@|g" \ + -e "s|@localedir[@]|@LOCALEDIR@|g" \ + -e "s|@sysconfdir[@]|@sysconfdir@|g" \ + -e "s|@localstatedir[@]|@localstatedir@|g" \ + -e "s|@libmakepkgdir[@]|@LIBMAKEPKGDIR@|g" \ + -e "s|@pkgdatadir[@]|@PKGDATADIR@|g" \ + -e "s|@prefix[@]|@PREFIX@|g" \ + -e "1s|#!/bin/bash|#!@BASH@|g" \ + -e "s|@PACKAGE_VERSION[@]|@PACKAGE_VERSION@|g" \ + -e "s|@PACKAGE_NAME[@]|@PACKAGE_NAME@|g" \ + -e "s|@BUILDSCRIPT[@]|@BUILDSCRIPT@|g" \ + -e "s|@TEMPLATE_DIR[@]|@TEMPLATE_DIR@|g" \ + -e "s|@DEBUGSUFFIX[@]|@DEBUGSUFFIX@|g" \ + -e "s|@INODECMD[@]|@INODECMD@|g" \ + -e "s|@OWNERCMD[@]|@OWNERCMD@|g" \ + -e "s|@MODECMD[@]|@MODECMD@|g" \ + -e "s|@SEDINPLACEFLAGS[@]|@SEDINPLACEFLAGS@|g" \ + -e "s|@SEDPATH[@]|@SEDPATH@|g" \ + -e "s|@DUFLAGS[@]|@DUFLAGS@|g" \ + -e "s|@DUPATH[@]|@DUPATH@|g" \ + -e "s|@configure_input[@]|Generated from ${output##*/}.sh.in; do not edit by hand.|g" \ + "$input" >"$output" + +if [[ $mode ]]; then + chmod "$mode" "$output" +fi |