Pārlūkot izejas kodu

More npm copying

Bob Mottram 7 gadus atpakaļ
vecāks
revīzija
0ed95a0691
1 mainītis faili ar 5 papildinājumiem un 4 dzēšanām
  1. 5
    4
      src/freedombone-utils-nodejs

+ 5
- 4
src/freedombone-utils-nodejs Parādīt failu

164
     nodejs_setup_global_modules
164
     nodejs_setup_global_modules
165
     nodejs_fix_cpu_detection
165
     nodejs_fix_cpu_detection
166
     $mesh_install_nodejs_prefix npm install --arch=$NPM_ARCH -g npm@${NPM_VERSION} --save
166
     $mesh_install_nodejs_prefix npm install --arch=$NPM_ARCH -g npm@${NPM_VERSION} --save
167
+    if [ -f "$rootdir/.npm-global/bin/npm" ]; then
168
+        cp "$rootdir/.npm-global/bin/npm" "$rootdir/usr/local/bin/npm"
169
+        cp "$rootdir/.npm-global/bin/npm" "$rootdir/usr/bin/npm"
170
+    fi
167
     if [ -f "$rootdir/usr/local/bin/npm" ]; then
171
     if [ -f "$rootdir/usr/local/bin/npm" ]; then
168
         cp "$rootdir/usr/local/bin/npm" "$rootdir/usr/bin/npm"
172
         cp "$rootdir/usr/local/bin/npm" "$rootdir/usr/bin/npm"
169
     fi
173
     fi
170
     cp "$rootdir/usr/bin/npm" "$rootdir/root/npm"
174
     cp "$rootdir/usr/bin/npm" "$rootdir/root/npm"
171
 
175
 
172
-    # deliberately called again
173
-    nodejs_fix_cpu_detection
174
-
175
     # update from the old debian nodejs version
176
     # update from the old debian nodejs version
176
     $mesh_install_nodejs_prefix npm install --arch=$NPM_ARCH -g n@${NODEJS_N_VERSION} --save
177
     $mesh_install_nodejs_prefix npm install --arch=$NPM_ARCH -g n@${NODEJS_N_VERSION} --save
177
     $mesh_install_nodejs_prefix n --arch $N_ARCH ${NODEJS_VERSION}
178
     $mesh_install_nodejs_prefix n --arch $N_ARCH ${NODEJS_VERSION}
178
     cp "$rootdir/root/npm" "$rootdir/usr/bin/npm"
179
     cp "$rootdir/root/npm" "$rootdir/usr/bin/npm"
179
-
180
+    cp "$rootdir/root/npm" "$rootdir/usr/local/bin/npm"
180
 
181
 
181
     # deliberate second install of npm
182
     # deliberate second install of npm
182
     $mesh_install_nodejs_prefix npm install --arch=$NPM_ARCH -g npm@${NPM_VERSION} --save
183
     $mesh_install_nodejs_prefix npm install --arch=$NPM_ARCH -g npm@${NPM_VERSION} --save