update openssl to latest stable version
[openadk.git] / scripts / reloc.sh
blobb0b2ca94c46d4cc03e30bcaa5ca2ee2a0d600631
1 #!/usr/bin/env bash
2 # execute this after relocation of adk directory
4 olddir=$(grep "^ADK_TOPDIR" prereq.mk 2>/dev/null |cut -d '=' -f 2)
5 newdir=$(pwd)
7 if [ ! -z "$olddir" ];then
8 if [ "$olddir" != "$newdir" ];then
9 echo "adk directory relocated!"
10 echo "old directory: $olddir"
11 echo "new directory: $newdir"
12 sed -i -e "s#$olddir#$newdir#g" $(find target_* -name \*.pc|xargs)
13 sed -i -e "s#$olddir#$newdir#g" $(find target_* -name \*.la|xargs)
14 sed -i -e "s#$olddir#$newdir#g" $(find target_*/scripts -type f|xargs)
15 sed -i -e "s#$olddir#$newdir#" target_*/etc/ipkg.conf
16 sed -i -e "s#$olddir#$newdir#" prereq.mk