|
1 | 1 | #!/usr/bin/perl |
2 | 2 | #----------------------------------------------------------------------------- |
3 | 3 | # |
4 | | -# Copyright (C) 2011 |
5 | | -# Michael Theall (mtheall) |
6 | | -# Dave Murphy (WinterMute) |
| 4 | +# Copyright (C) 2011 |
| 5 | +# Michael Theall (mtheall) |
| 6 | +# Dave Murphy (WinterMute) |
7 | 7 | # |
8 | | -# This software is provided 'as-is', without any express or implied |
9 | | -# warranty. In no event will the authors be held liable for any |
10 | | -# damages arising from the use of this software. |
| 8 | +# This software is provided 'as-is', without any express or implied |
| 9 | +# warranty. In no event will the authors be held liable for any |
| 10 | +# damages arising from the use of this software. |
11 | 11 | # |
12 | | -# Permission is granted to anyone to use this software for any |
13 | | -# purpose, including commercial applications, and to alter it and |
14 | | -# redistribute it freely, subject to the following restrictions: |
| 12 | +# Permission is granted to anyone to use this software for any |
| 13 | +# purpose, including commercial applications, and to alter it and |
| 14 | +# redistribute it freely, subject to the following restrictions: |
15 | 15 | # |
16 | | -# 1. The origin of this software must not be misrepresented; you |
17 | | -# must not claim that you wrote the original software. If you use |
18 | | -# this software in a product, an acknowledgment in the product |
19 | | -# documentation would be appreciated but is not required. |
20 | | -# 2. Altered source versions must be plainly marked as such, and |
21 | | -# must not be misrepresented as being the original software. |
22 | | -# 3. This notice may not be removed or altered from any source |
23 | | -# distribution. |
| 16 | +# 1. The origin of this software must not be misrepresented; you |
| 17 | +# must not claim that you wrote the original software. If you use |
| 18 | +# this software in a product, an acknowledgment in the product |
| 19 | +# documentation would be appreciated but is not required. |
| 20 | +# 2. Altered source versions must be plainly marked as such, and |
| 21 | +# must not be misrepresented as being the original software. |
| 22 | +# 3. This notice may not be removed or altered from any source |
| 23 | +# distribution. |
24 | 24 | # |
25 | 25 | #----------------------------------------------------------------------------- |
26 | 26 | use strict; |
|
59 | 59 | # Check OS information |
60 | 60 | if($os eq "Linux" and ($arch eq "i686" or $arch eq "x86_64")) |
61 | 61 | { |
62 | | - $downloader = "wget -q"; |
63 | | - $archname = $arch . "-linux"; |
| 62 | + $downloader = "wget -q"; |
| 63 | + $archname = $arch . "-linux"; |
64 | 64 | } |
65 | 65 | elsif($os eq "Darwin") |
66 | 66 | { |
67 | | - $downloader = "curl -L -O -s"; |
68 | | - $archname = "osx"; |
| 67 | + $downloader = "curl -L -O -s"; |
| 68 | + $archname = "osx"; |
69 | 69 | } |
70 | 70 | else |
71 | 71 | { |
|
79 | 79 | mkdir("$dir") or die $!; |
80 | 80 | } |
81 | 81 |
|
| 82 | + if(!(-d "$dir/libctru")) |
| 83 | + { |
| 84 | + mkdir("$dir/libctru") or die $!; |
| 85 | + } |
82 | 86 | if(!(-d "$dir/libnds")) |
83 | 87 | { |
84 | 88 | mkdir("$dir/libnds") or die $!; |
|
111 | 115 | # Grab update file |
112 | 116 | if(-e "devkitProUpdate.ini") |
113 | 117 | { |
114 | | - unlink("devkitProUpdate.ini") or die $!; |
| 118 | + unlink("devkitProUpdate.ini") or die $!; |
115 | 119 | } |
116 | 120 | printf("Downloading update file..."); |
117 | 121 | system($downloader . " http://devkitpro.sourceforge.net/devkitProUpdate.ini") and die "Failed to download!"; |
|
134 | 138 | 'ndsexamples' => 0, |
135 | 139 | 'defaultarm7' => 0, |
136 | 140 | 'filesystem' => 0, |
| 141 | + 'libctru' => 0, |
137 | 142 | ); |
138 | 143 | my %newVersions = %versions; |
139 | 144 |
|
|
198 | 203 | printf("%s is up-to-date\n", $key); |
199 | 204 | } |
200 | 205 | } |
201 | | - |
| 206 | + |
202 | 207 | # Download files |
203 | 208 | foreach my $key (keys %updates) |
204 | 209 | { |
|
231 | 236 | 'ndsexamples' => 'examples/nds', |
232 | 237 | 'defaultarm7' => 'libnds', |
233 | 238 | 'filesystem' => 'libnds', |
| 239 | + 'libctru' => 'libctru', |
234 | 240 | ); |
235 | 241 |
|
236 | 242 | foreach my $key (keys %updates) |
|
0 commit comments