summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-05-29 22:23:00 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-05-29 22:23:00 +0000
commit9a3902f258d70f1f090a2bbf2c91c9848da0de44 (patch)
tree20b0eb06c78b6f5589b4bb15070c75c297628775
parent3f84575d26b9012499916bd4fa4ad9ee48f1ddd7 (diff)
downloadrockbox-9a3902f258d70f1f090a2bbf2c91c9848da0de44.tar.gz
rockbox-9a3902f258d70f1f090a2bbf2c91c9848da0de44.zip
Check the download and prefix dirs somewhat before proceeding, output the
info in a slightly nicer way. Mention that the download and prefix paths can be changed by editing the (top of the) script itself. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10015 a1c6a512-1295-4272-9138-f99709370657
-rwxr-xr-xtools/rockboxdev.sh71
1 files changed, 45 insertions, 26 deletions
diff --git a/tools/rockboxdev.sh b/tools/rockboxdev.sh
index b6419cf54d..d7328c54c6 100755
--- a/tools/rockboxdev.sh
+++ b/tools/rockboxdev.sh
@@ -58,7 +58,43 @@ getfile() {
58 58
59} 59}
60 60
61echo "Pick target arch:" 61###########################################################################
62# Verify download directory or create it
63if test -d "$dlwhere"; then
64 if ! test -w "$dlwhere"; then
65 echo "$dlwhere exists, but doesn't seem to be writable for you"
66 exit
67 fi
68else
69 mkdir $dlwhere
70 if test $? -ne 0; then
71 echo "$dlwhere is missing and we failed to create it!"
72 exit
73 fi
74 echo "$dlwhere has been created to store downloads in"
75fi
76
77echo "Download directory: $dlwhere (edit script to change dir)"
78echo "Install prefix: $prefix/[target] (edit script to change dir)"
79
80###########################################################################
81# Verify that we can write in the prefix dir, as otherwise we will hardly
82# be able to install there!
83if test ! -w $prefix; then
84 echo "WARNING: this script is set to install in $prefix but has no"
85 echo "WARNING: write permission to do so!"
86fi
87
88
89###########################################################################
90# If there's already a build dir, we don't overwrite it
91if test -d build-rbdev; then
92 echo "you have a build-rbdev dir already, please remove and rerun"
93 exit
94fi
95
96echo ""
97echo "Select target arch:"
62echo "s. sh" 98echo "s. sh"
63echo "m. m68k" 99echo "m. m68k"
64echo "a. arm" 100echo "a. arm"
@@ -86,30 +122,8 @@ case $arch in
86 ;; 122 ;;
87esac 123esac
88 124
89# Verify download directory or create it
90if test -d "$dlwhere"; then
91 if test -w "$dlwhere"; then
92 echo "Download directory $dlwhere seems to exist and is writable"
93 else
94 echo "$dlwhere exists, but doesn't seem to be writable for you"
95 exit
96 fi
97else
98 mkdir $dlwhere
99 if test $? -ne 0; then
100 echo "$dlwhere is missing and we failed to create it!"
101 exit
102 fi
103 echo "$dlwhere has been created to store downloads in"
104fi
105
106if test -d build-rbdev; then
107 echo "you have a build-rbdev dir already, please remove and rerun"
108 exit
109fi
110
111bindir="$prefix/$target/bin" 125bindir="$prefix/$target/bin"
112echo "Summary:" 126echo "== Summary =="
113echo "Target: $target" 127echo "Target: $target"
114echo "gcc $gccver" 128echo "gcc $gccver"
115if test -n "$gccpatch"; then 129if test -n "$gccpatch"; then
@@ -117,9 +131,12 @@ if test -n "$gccpatch"; then
117fi 131fi
118echo "binutils $binutils" 132echo "binutils $binutils"
119echo "install in $prefix/$target" 133echo "install in $prefix/$target"
120echo ""
121echo "Set your PATH to point to $bindir"
122 134
135echo "when complete, make your PATH include $bindir"
136
137echo ""
138echo "press ENTER to start"
139read input
123 140
124if test -f "$dlwhere/binutils-$binutils.tar.bz2"; then 141if test -f "$dlwhere/binutils-$binutils.tar.bz2"; then
125 echo "binutils $binutils already downloaded" 142 echo "binutils $binutils already downloaded"
@@ -169,3 +186,5 @@ make
169make install 186make install
170 187
171echo "done" 188echo "done"
189echo ""
190echo "Set your PATH to point to $bindir"