diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-03-12 16:35:03 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-03-12 16:35:03 +0000 |
commit | 56973b43a616588a84d8a72e4a89866474e3d6b2 (patch) | |
tree | 460a2cce4e36500429c5c3217d81cbe68e376e85 /tools | |
parent | 1913a4517b352fc33b3456d0fd3941ec458ab8e9 (diff) | |
download | rockbox-56973b43a616588a84d8a72e4a89866474e3d6b2.tar.gz rockbox-56973b43a616588a84d8a72e4a89866474e3d6b2.zip |
rockboxdev.sh: Fix summary (it ended up in the wrong path after my previous commit to this file)
Also, check if the prefix dir exists before checking write permissions to avoid confusing error messages.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20303 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/rockboxdev.sh | 67 |
1 files changed, 38 insertions, 29 deletions
diff --git a/tools/rockboxdev.sh b/tools/rockboxdev.sh index d322ef1a50..fba56d2fbe 100755 --- a/tools/rockboxdev.sh +++ b/tools/rockboxdev.sh @@ -122,8 +122,13 @@ echo "Install prefix: $prefix/[target] (set RBDEV_PREFIX to change dir)" echo "Build dir: $builddir (set RBDEV_BUILD to change dir)" ########################################################################### -# Verify that we can write in the prefix dir, as otherwise we will hardly -# be able to install there! +# Verify that the prefix dir exists and that we can write to it, +# as otherwise we will hardly be able to install there! +if test ! -d $prefix; then + echo "WARNING: The installation destination does not exist." + echo "Please create it and re-run this script" + exit +fi if test ! -w $prefix; then echo "WARNING: This script is set to install in $prefix but has no write permissions for it" echo "Please fix this and re-run this script" @@ -206,32 +211,6 @@ else pathadd="$bindir" fi -summary="summary-$1" - -echo "============================ Summary ============================" > $summary -echo "target: $target" >> $summary -echo "gcc version: $gccver" >> $summary -if test -n "$gccpatch"; then - echo "gcc patch: $gccpatch" >> $summary -fi -echo "binutils: $binutils" >> $summary -echo "installation target: $prefix/$target" >> $summary -echo "" >> $summary -echo "When done, append $bindir to PATH" >> $summary -echo "=================================================================" >> $summary - -cat $summary - -echo "" -echo "In case you encounter a slow internet connection, you can use an alternative mirror." -echo "A list of other GNU mirrors is available here: http://www.gnu.org/prep/ftp.html" -echo "" -echo "Usage: GNU_MIRROR=[URL] ./rockboxdev.sh" -echo "" -echo "Example:" -echo "$ GNU_MIRROR=http://mirrors.kernel.org/gnu ./rockboxdev.sh" -echo "" - if test -f "$dlwhere/binutils-$binutils.tar.bz2"; then echo "binutils $binutils already downloaded" else @@ -253,7 +232,7 @@ if test -n "$gccpatch"; then fi ########################################################################### -# If there's already a build dir, we don't overwrite it +# If there's already a build dir, we don't overwrite or delete it if test -d $builddir; then echo "You already have a $builddir directory!" echo "Please remove it and re-run the script" @@ -263,6 +242,36 @@ else cd $builddir fi +########################################################################### +# Create a summary file for each toolchain, containing info about the version +# and a remainder to append the compiler path to PATH + +summary="summary-$1" + +echo "============================ Summary ============================" > $summary +echo "target: $target" >> $summary +echo "gcc version: $gccver" >> $summary +if test -n "$gccpatch"; then + echo "gcc patch: $gccpatch" >> $summary +fi +echo "binutils: $binutils" >> $summary +echo "installation target: $prefix/$target" >> $summary +echo "" >> $summary +echo "When done, append $bindir to PATH" >> $summary +echo "=================================================================" >> $summary + +cat $summary + +echo "" +echo "In case you encounter a slow internet connection, you can use an alternative mirror." +echo "A list of other GNU mirrors is available here: http://www.gnu.org/prep/ftp.html" +echo "" +echo "Usage: GNU_MIRROR=[URL] ./rockboxdev.sh" +echo "" +echo "Example:" +echo "$ GNU_MIRROR=http://mirrors.kernel.org/gnu ./rockboxdev.sh" +echo "" + echo "ROCKBOXDEV: extracting binutils-$binutils in $builddir" tar xjf $dlwhere/binutils-$binutils.tar.bz2 |