2012-01-05 00:09:13 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# script for creating a zip and tarball for inclusion in node
|
|
|
|
|
|
|
|
unset CDPATH
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
rm -rf release *.tgz || true
|
|
|
|
mkdir release
|
2017-05-09 23:46:02 +02:00
|
|
|
node ./bin/npm-cli.js pack --loglevel error >/dev/null
|
2012-01-05 00:09:13 +01:00
|
|
|
mv *.tgz release
|
|
|
|
cd release
|
|
|
|
tar xzf *.tgz
|
2018-04-21 03:26:37 +02:00
|
|
|
cp -r ../test package/
|
2012-01-05 00:09:13 +01:00
|
|
|
|
|
|
|
mkdir node_modules
|
|
|
|
mv package node_modules/npm
|
|
|
|
|
|
|
|
# make the zip for windows users
|
|
|
|
cp node_modules/npm/bin/*.cmd .
|
2017-05-09 23:46:02 +02:00
|
|
|
zipname=npm-$(node ../bin/npm-cli.js -v).zip
|
2012-01-05 00:09:13 +01:00
|
|
|
zip -q -9 -r -X "$zipname" *.cmd node_modules
|
|
|
|
|
|
|
|
# make the tar for node's deps
|
|
|
|
cd node_modules
|
2017-05-09 23:46:02 +02:00
|
|
|
tarname=npm-$(node ../../bin/npm-cli.js -v).tgz
|
2012-01-05 00:09:13 +01:00
|
|
|
tar czf "$tarname" npm
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
mv "node_modules/$tarname" .
|
|
|
|
|
|
|
|
rm -rf *.cmd
|
|
|
|
rm -rf node_modules
|
|
|
|
|
2018-04-21 03:26:37 +02:00
|
|
|
cd ..
|
|
|
|
|
2012-01-05 00:09:13 +01:00
|
|
|
echo "release/$tarname"
|
|
|
|
echo "release/$zipname"
|