exports before scuttlebot install
This commit is contained in:
parent
a67fc56d8c
commit
561fd38b7a
|
@ -357,24 +357,6 @@ function scuttlebot_git_setup {
|
|||
fi
|
||||
}
|
||||
|
||||
function mesh_setup_npm {
|
||||
cat <<EOF > "$rootdir/usr/bin/install_npm_global"
|
||||
#!/bin/bash
|
||||
if [ ! -d ~/.npm-global ]; then
|
||||
mkdir ~/.npm-global
|
||||
fi
|
||||
npm config set prefix '~/.npm-global'
|
||||
if [[ "$PATH" != *'~/.npm-global/bin'* ]]; then
|
||||
export PATH=~/.npm-global/bin:$PATH
|
||||
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
|
||||
fi
|
||||
source ~/.profile
|
||||
EOF
|
||||
chroot "$rootdir" /bin/chmod +x /usr/bin/install_npm_global
|
||||
chroot "$rootdir" /usr/bin/install_npm_global
|
||||
rm "$rootdir/usr/bin/install_npm_global"
|
||||
}
|
||||
|
||||
function mesh_install_dat {
|
||||
get_npm_arch
|
||||
mesh_setup_npm
|
||||
|
@ -402,6 +384,9 @@ function mesh_install_scuttlebot {
|
|||
|
||||
cat <<EOF > "$rootdir/usr/bin/install_scuttlebot"
|
||||
#!/bin/bash
|
||||
export PATH=~/.npm-global/bin:$PATH
|
||||
export NPM_CONFIG_PREFIX=~/.npm-global
|
||||
source ~/.profile
|
||||
if ! npm install --unsafe-perm --verbose --arch=$NPM_ARCH -g scuttlebot@${SCUTTLEBOT_VERSION}; then
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
@ -244,6 +244,25 @@ function nodejs_upgrade {
|
|||
npm update -g
|
||||
}
|
||||
|
||||
function mesh_setup_npm {
|
||||
cat <<EOF > "$rootdir/usr/bin/install_npm_global"
|
||||
#!/bin/bash
|
||||
if [ ! -d ~/.npm-global ]; then
|
||||
mkdir ~/.npm-global
|
||||
fi
|
||||
npm config set prefix '~/.npm-global'
|
||||
if [[ "$PATH" != *'~/.npm-global/bin'* ]]; then
|
||||
export PATH=~/.npm-global/bin:$PATH
|
||||
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
|
||||
fi
|
||||
export NPM_CONFIG_PREFIX=~/.npm-global
|
||||
source ~/.profile
|
||||
EOF
|
||||
chroot "$rootdir" /bin/chmod +x /usr/bin/install_npm_global
|
||||
chroot "$rootdir" /usr/bin/install_npm_global
|
||||
rm "$rootdir/usr/bin/install_npm_global"
|
||||
}
|
||||
|
||||
function nodejs_setup_global_modules {
|
||||
if [ ! -f /usr/local/bin/node ]; then
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue