summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmeta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal52
1 files changed, 27 insertions, 25 deletions
diff --git a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
index 76acaa7e8a..fbcd2ceb3c 100755
--- a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
+++ b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
@@ -158,31 +158,33 @@ fi
158# the entire directory structure. We could patch opkg to do that but it's far 158# the entire directory structure. We could patch opkg to do that but it's far
159# simpler to do that here and achieve the same result. 159# simpler to do that here and achieve the same result.
160# This is done in two steps: 160# This is done in two steps:
161# Step 1: copy ./opt/${DISTRO}/${SDK_VERSION} contents to $NATIVE_INSTALL_DIR. 161if [ -d $NATIVE_INSTALL_DIR/$DEFAULT_INSTALL_FOLDER ]; then
162# We cannot use move if $NATIVE_INSTALL_DIR is not empty (for example: contains 162 # Step 1: copy ./opt/${DISTRO}/${SDK_VERSION} contents to $NATIVE_INSTALL_DIR.
163# another SDK) 163 # We cannot use move if $NATIVE_INSTALL_DIR is not empty (for example: contains
164$SUDO cp -r $NATIVE_INSTALL_DIR/$DEFAULT_INSTALL_FOLDER/* $NATIVE_INSTALL_DIR 164 # another SDK)
165 165 $SUDO cp -r $NATIVE_INSTALL_DIR/$DEFAULT_INSTALL_FOLDER/* $NATIVE_INSTALL_DIR
166# delete the source directory now 166
167$SUDO rm -rf $NATIVE_INSTALL_DIR/$DEFAULT_INSTALL_FOLDER/* 167 # delete the source directory now
168 168 $SUDO rm -rf $NATIVE_INSTALL_DIR/$DEFAULT_INSTALL_FOLDER/*
169# Step 2: Delete the ./opt/${DISTRO}/${SDK_VERSION} directories too, they should be empty 169
170dir=$NATIVE_INSTALL_DIR/$DEFAULT_INSTALL_FOLDER 170 # Step 2: Delete the ./opt/${DISTRO}/${SDK_VERSION} directories too, they should be empty
171while [ "$dir" != "$NATIVE_INSTALL_DIR" ]; do 171 dir=$NATIVE_INSTALL_DIR/$DEFAULT_INSTALL_FOLDER
172 # if the user chose / as the install folder, then we should leave /opt in place 172 while [ "$dir" != "$NATIVE_INSTALL_DIR" ]; do
173 if [ "$dir" = "/opt" ]; then 173 # if the user chose / as the install folder, then we should leave /opt in place
174 break 174 if [ "$dir" = "/opt" ]; then
175 fi 175 break
176 176 fi
177 # try to delete the directory, only if it's empty 177
178 $SUDO rmdir $dir 178 # try to delete the directory, only if it's empty
179 if [ $? -ne 0 ]; then 179 $SUDO rmdir $dir
180 break 180 if [ $? -ne 0 ]; then
181 fi 181 break
182 182 fi
183 # go to the next directory 183
184 dir=$(dirname $dir) 184 # go to the next directory
185done 185 dir=$(dirname $dir)
186 done
187fi
186 188
187# Link the ld.so.cache file into the hosts filesystem 189# Link the ld.so.cache file into the hosts filesystem
188if [ ! -f "$OECORE_NATIVE_SYSROOT/etc/ld.so.cache" ]; then 190if [ ! -f "$OECORE_NATIVE_SYSROOT/etc/ld.so.cache" ]; then