summaryrefslogtreecommitdiffstats
path: root/scripts/paths_replace.sh
blob: 2326e605cb0341b3453c966993835164ce76d884 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
set -e

templatefile="$1"
targetfile="$2"
instdir="$3"

echo "pathreplace: template=$templatefile  target=$targetfile  instdir=$instdir"

instdir="$(echo $instdir | sed 's/\//\\\//g')"
ex='s/\$\$INSTDIR\$\$/'"$instdir"'/g'
sed $ex "$templatefile" > "$targetfile"
bues.ch cgit interface