]> code.ossystems Code Review - openembedded-core.git/commitdiff
adt-installer: add sudo when relocating symlinks
authorLaurentiu Palcu <laurentiu.palcu@intel.com>
Sun, 23 Sep 2012 14:14:27 +0000 (17:14 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 24 Sep 2012 10:07:16 +0000 (11:07 +0100)
This is needed if installation is done in a directory that needs root
privileges.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal

index 63fcf600126822df32357dc881889998d3bcc571..9a1357366b7ec6ea517a052e80a09ad364b1617e 100755 (executable)
@@ -217,7 +217,7 @@ find $OECORE_NATIVE_SYSROOT -type f -exec file '{}' \;|grep ":.*ASCII.*text"|cut
 
 # change all symlinks pointing to /opt/${DISTRO}/${SDK_VERSION}
 for l in $(find $NATIVE_INSTALL_DIR -type l); do
-       ln -sf $(readlink $l|sed -e "s:$DEFAULT_INSTALL_FOLDER:$NATIVE_INSTALL_DIR:") $l
+    $SUDO ln -sf $(readlink $l|sed -e "s:$DEFAULT_INSTALL_FOLDER:$NATIVE_INSTALL_DIR:") $l
 done
 
 echo_info "\nSuccessfully installed selected native ADT!"