|
42 | 42 |
|
43 | 43 | puts "Installing the Java SE Development Kit... This might take some time, please, be patient. (You might need to provide your password.)"
|
44 | 44 | system('brew cask install java')
|
45 |
| -system('echo "export JAVA_HOME=$(/usr/libexec/java_home)" >> ~/.bash_profile') |
46 |
| -system('echo "export ANDROID_HOME=/usr/local/opt/android-sdk" >> ~/.bash_profile') |
| 45 | +system('echo "export JAVA_HOME=$(/usr/libexec/java_home)" >> ~/.profile') |
47 | 46 |
|
48 |
| -puts "Installing node.js 0.12" |
49 |
| -system('brew install homebrew/versions/node012') |
| 47 | +puts "Installing Android SDK" |
| 48 | +system('brew install android-sdk') |
| 49 | +system('echo "export ANDROID_HOME=/usr/local/opt/android-sdk" >> ~/.profile') |
50 | 50 |
|
51 |
| -puts "Creating Homebrew formula for NativeScript." |
52 |
| -File.open("/usr/local/Library/Formula/native-script.rb", "w:utf-8") do |f| |
53 |
| - f.write DATA.read |
54 |
| -end |
55 |
| - |
56 |
| -puts "Installing NativeScript formula... This might take some time, please, be patient." |
57 |
| -system('brew install native-script') |
58 |
| - |
59 |
| -__END__ |
| 51 | +puts "Configuring your system for Android development... This might take some time, please, be patient." |
| 52 | +system "echo yes | /usr/local/opt/android-sdk/tools/android update sdk --filter tools,platform-tools,android-23,build-tools-23.0.2,extra-android-m2repository --all --no-ui" |
60 | 53 |
|
61 |
| -class NativeScript < Formula |
62 |
| - desc "NativeScript" |
63 |
| - homepage "https://www.nativescript.org" |
64 |
| - version "1.3.0" |
65 |
| - url "https://raw.githubusercontent.com/NativeScript/nativescript-cli/brew/setup/empty.tar.gz" |
66 |
| - sha256 "813e1b809c094d29255191c14892a32a498e2ca298abbf5ce5cb4081faa4e88f" |
| 54 | +puts "Installing Node.js 4" |
| 55 | +system('brew install homebrew/versions/node4-lts') |
67 | 56 |
|
68 |
| - depends_on :macos => :yosemite |
69 |
| - depends_on "pkg-config" => :build |
70 |
| -# depends_on "node" # currently we do not work with latest node, and we manually install 0.12 (see above) |
71 |
| - depends_on "android-sdk" |
| 57 | +puts "Installing NativeScript CLI..." |
| 58 | +system "/usr/local/bin/npm install -g nativescript" |
72 | 59 |
|
73 |
| - def install |
74 |
| - ohai "Installing NativeScript CLI..." |
75 |
| - system "/usr/local/bin/npm install -g nativescript" |
76 |
| - |
77 |
| - ohai "Configuring your system for Android development... This might take some time, please, be patient." |
78 |
| - system "echo yes | android update sdk --filter tools,platform-tools,android-23,build-tools-23.0.2,extra-android-m2repository --all --no-ui" |
79 |
| - |
80 |
| - ohai "The ANDROID_HOME and JAVA_HOME environment variables have been added to your .bash_profile. Restart the terminal to use them." |
81 |
| - end |
82 |
| -end |
| 60 | +puts "The ANDROID_HOME and JAVA_HOME environment variables have been added to your .profile. Restart the terminal to use them." |
0 commit comments