File tree 2 files changed +32
-0
lines changed
2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 46
46
" scripts/packager.sh" ,
47
47
" scripts/react_native_pods.rb" ,
48
48
" scripts/react-native-xcode.sh" ,
49
+ " scripts/find-node.sh" ,
49
50
" template.config.js" ,
50
51
" template" ,
51
52
" third-party-podspecs"
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # Copyright (c) Facebook, Inc. and its affiliates.
3
+ #
4
+ # This source code is licensed under the MIT license found in the
5
+ # LICENSE file in the root directory of this source tree.
6
+
7
+ set -e
8
+
9
+ # Define NVM_DIR and source the nvm.sh setup script
10
+ [ -z " $NVM_DIR " ] && export NVM_DIR=" $HOME /.nvm"
11
+
12
+ if [[ -s " $HOME /.nvm/nvm.sh" ]]; then
13
+ . " $HOME /.nvm/nvm.sh"
14
+ elif [[ -x " $( command -v brew) " && -s " $( brew --prefix nvm) /nvm.sh" ]]; then
15
+ . " $( brew --prefix nvm) /nvm.sh"
16
+ fi
17
+
18
+ # Set up the nodenv node version manager if present
19
+ if [[ -x " $HOME /.nodenv/bin/nodenv" ]]; then
20
+ eval " $( " $HOME /.nodenv/bin/nodenv" init -) "
21
+ elif [[ -x " $( command -v brew) " && -x " $( brew --prefix nodenv) /bin/nodenv" ]]; then
22
+ eval " $( " $( brew --prefix nodenv) /bin/nodenv" init -) "
23
+ fi
24
+
25
+ # Set up the ndenv of anyenv if preset
26
+ if [[ ! -x node && -d ${HOME} /.anyenv/bin ]]; then
27
+ export PATH=${HOME} /.anyenv/bin:${PATH}
28
+ if [[ " $( anyenv envs | grep -c ndenv ) " -eq 1 ]]; then
29
+ eval " $( anyenv init -) "
30
+ fi
31
+ fi
You can’t perform that action at this time.
0 commit comments