From: Nils Kneuper Date: Tue, 14 Feb 2012 13:37:29 +0000 (+0100) Subject: add some checks if opkg or extracting the tarball fails (most likely due X-Git-Tag: sz_beta3~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15f93124f658b206a791b8d29a69109bfbf98467;p=pandora-misc.git add some checks if opkg or extracting the tarball fails (most likely due to "out of diskspace") --- diff --git a/sdk_installer/openpandora_toolchain.sh b/sdk_installer/openpandora_toolchain.sh index b939992..4f0f73d 100755 --- a/sdk_installer/openpandora_toolchain.sh +++ b/sdk_installer/openpandora_toolchain.sh @@ -171,6 +171,16 @@ check_wget_error() } +check_error() +{ + if [ "$?" -ne "0" ]; + then + cecho "ERROR: Sorry, some error occured. Stopping this script now. Please check for the error message above (eg. 'not enough space left') and fix them before retrying the script." $red + exit 1 + fi +} + + check_md5sum() { LOCAL_ARCHIV=${1} @@ -231,6 +241,7 @@ install_codesourcery_toolchain() echo -e cecho "Extracting codesourcery toolchain to $PNDSDK_DIR" $green tar -xjf $TMPDIR/$TOOLCHAIN_TARBALL_NAME -C $PNDSDK_DIR + check_error #move libstdc++ files that are going to just hurt to some place where they should not be a bother... #the version later on installed by the libstdc++ package should be perfectly fine! @@ -452,12 +463,14 @@ install_libs_via_opkg() cecho "Updating opkg package feeds" $green #update repository against latest version $PNDSDK/bin/opkg-cl --conf=$PNDSDK/opkg.conf --offline-root=$PNDSDK update + check_error echo -e cecho "Installing all libs, based on $TMPDIR/packages.txt" $green cecho "Error messages from opkg about missing dependencies can be ignored!" $cyan #install all possible dev packages adding their deps, too $PNDSDK/bin/opkg-cl --conf=$PNDSDK/opkg.conf --cache=$TMPDIR --offline-root=$PNDSDK install `cat $TMPDIR/packages.txt | cut -f 1 -d " " | xargs echo` + check_error cecho "The error messages from opkg about missing dependencies can be ignored!" $cyan echo -e