diff options
Diffstat (limited to 'tools/rockboxdev.sh')
-rwxr-xr-x | tools/rockboxdev.sh | 71 |
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 | ||
61 | echo "Pick target arch:" | 61 | ########################################################################### |
62 | # Verify download directory or create it | ||
63 | if 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 | ||
68 | else | ||
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" | ||
75 | fi | ||
76 | |||
77 | echo "Download directory: $dlwhere (edit script to change dir)" | ||
78 | echo "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! | ||
83 | if 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!" | ||
86 | fi | ||
87 | |||
88 | |||
89 | ########################################################################### | ||
90 | # If there's already a build dir, we don't overwrite it | ||
91 | if test -d build-rbdev; then | ||
92 | echo "you have a build-rbdev dir already, please remove and rerun" | ||
93 | exit | ||
94 | fi | ||
95 | |||
96 | echo "" | ||
97 | echo "Select target arch:" | ||
62 | echo "s. sh" | 98 | echo "s. sh" |
63 | echo "m. m68k" | 99 | echo "m. m68k" |
64 | echo "a. arm" | 100 | echo "a. arm" |
@@ -86,30 +122,8 @@ case $arch in | |||
86 | ;; | 122 | ;; |
87 | esac | 123 | esac |
88 | 124 | ||
89 | # Verify download directory or create it | ||
90 | if 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 | ||
97 | else | ||
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" | ||
104 | fi | ||
105 | |||
106 | if test -d build-rbdev; then | ||
107 | echo "you have a build-rbdev dir already, please remove and rerun" | ||
108 | exit | ||
109 | fi | ||
110 | |||
111 | bindir="$prefix/$target/bin" | 125 | bindir="$prefix/$target/bin" |
112 | echo "Summary:" | 126 | echo "== Summary ==" |
113 | echo "Target: $target" | 127 | echo "Target: $target" |
114 | echo "gcc $gccver" | 128 | echo "gcc $gccver" |
115 | if test -n "$gccpatch"; then | 129 | if test -n "$gccpatch"; then |
@@ -117,9 +131,12 @@ if test -n "$gccpatch"; then | |||
117 | fi | 131 | fi |
118 | echo "binutils $binutils" | 132 | echo "binutils $binutils" |
119 | echo "install in $prefix/$target" | 133 | echo "install in $prefix/$target" |
120 | echo "" | ||
121 | echo "Set your PATH to point to $bindir" | ||
122 | 134 | ||
135 | echo "when complete, make your PATH include $bindir" | ||
136 | |||
137 | echo "" | ||
138 | echo "press ENTER to start" | ||
139 | read input | ||
123 | 140 | ||
124 | if test -f "$dlwhere/binutils-$binutils.tar.bz2"; then | 141 | if 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 | |||
169 | make install | 186 | make install |
170 | 187 | ||
171 | echo "done" | 188 | echo "done" |
189 | echo "" | ||
190 | echo "Set your PATH to point to $bindir" | ||