summaryrefslogtreecommitdiff
path: root/scripts/reloc.sh
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2011-01-18 18:10:19 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2011-01-18 18:10:19 +0100
commit46b2bb3001ce838ba2483a08418587d8a027f3a9 (patch)
treeb2b618839b5afcc859fcb90556e6f199d9a9a10c /scripts/reloc.sh
parent88d3e6d6c572143bd95a589a44e30bfefd616b88 (diff)
parent902ee7e7b23751ca7a8264d36a837aa4aae12032 (diff)
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'scripts/reloc.sh')
-rwxr-xr-xscripts/reloc.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/reloc.sh b/scripts/reloc.sh
new file mode 100755
index 000000000..f7a0a1e3b
--- /dev/null
+++ b/scripts/reloc.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+# execute this after relocation of adk directory
+
+olddir=$(grep "^TOPDIR" prereq.mk |cut -d '=' -f 2)
+newdir=$(pwd)
+
+if [ "$olddir" != "$newdir" ];then
+ echo "adk directory relocated!"
+ echo "old directory: $olddir"
+ echo "new directory: $newdir"
+ sed -i -e "s#$olddir#$newdir#g" $(find target_* -name \*.pc|xargs)
+ sed -i -e "s#$olddir#$newdir#g" $(find target_* -name \*.la|xargs)
+ sed -i -e "s#$olddir#$newdir#g" $(find target_*/scripts -type f|xargs)
+ sed -i -e "s#$olddir#$newdir#" target_*/etc/ipkg.conf
+ sed -i -e "s#$olddir#$newdir#" prereq.mk
+fi