#!/bin/sh # script to populate an npm server with the contents of the node_modules git repository. #override any registry settings in package.json registry=http:\\/\\/solrdev.ecmwf.int:4873\\/ declare -i i=0 home=`pwd` for d in `ls -1`; do cd $home if [ -d $d ] then echo $i $d cd $d && \ sed -i -e 's/"registry": ".*"/"registry": "'${registry}'"/' package.json && \ npm unpublish --force && \ npm publish; fi i=$i+1 if [ $i -gt 200 ]; then exit; fi done