diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/reloc.sh | 16 |
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 |