summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2011-03-28 03:14:11 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2011-03-28 03:14:11 +0200
commit6692b15f8bd7ffc742cce5b67b963b458f87f8b6 (patch)
tree79a31627c30541f99d195fbd138bd3ae91920ba1 /scripts
parentbc70557e8384f24c5a8af02f0a592b016591c097 (diff)
avoid warnings on fresh checkout
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/reloc.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/reloc.sh b/scripts/reloc.sh
index f7a0a1e3b..59323612f 100755
--- a/scripts/reloc.sh
+++ b/scripts/reloc.sh
@@ -1,10 +1,11 @@
#!/usr/bin/env bash
# execute this after relocation of adk directory
-olddir=$(grep "^TOPDIR" prereq.mk |cut -d '=' -f 2)
+olddir=$(grep "^TOPDIR" prereq.mk 2>/dev/null |cut -d '=' -f 2)
newdir=$(pwd)
-if [ "$olddir" != "$newdir" ];then
+if [ ! -z $olddir ];then
+ if [ "$olddir" != "$newdir" ];then
echo "adk directory relocated!"
echo "old directory: $olddir"
echo "new directory: $newdir"
@@ -13,4 +14,5 @@ if [ "$olddir" != "$newdir" ];then
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
fi