summaryrefslogtreecommitdiffstats
path: root/set-pwd.sh
blob: 1ed18c2cea0981482d4391d20753823489277a1a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh
files="api/change-order.php api/export.php api/add.php api/remove.php src/data.php"

[ -z "$1" ] && cwd="." || cwd="$1"

path="$(readlink -e "$cwd")"

for file in $files; do
	sed -i "s;%PWD%;$path/;" "$file"
done