summaryrefslogtreecommitdiffstats
path: root/set-pwd.sh
diff options
context:
space:
mode:
Diffstat (limited to 'set-pwd.sh')
-rwxr-xr-xset-pwd.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/set-pwd.sh b/set-pwd.sh
new file mode 100755
index 0000000..c6963f5
--- /dev/null
+++ b/set-pwd.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+files="api/change-order.php api/export.php api/add.php api/remove.php src/data.php"
+
+[ -z "$1" ] && echo "\$1 has to be directory where project lives" && exit 1
+path="$(readlink -e "$1")"
+
+for file in $files; do
+ sed -i "s;%PWD%;$1/;" "$file"
+done