Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 43 lines (35 sloc) 844 Bytes
#!/bin/bash
c=${npm_package_config_couch}
if [ "$c" == "" ]; then
cat >&2 <<-ERR
Please set a valid 'npmjs.org:couch' npm config.
You can put PASSWORD in the setting somewhere to
have it prompt you for a password each time, so
it doesn't get dropped in your config file.
If you have PASSWORD in there, it'll also be read
from the PASSWORD environment variable, so you
can set it in the env and not have to enter it
each time.
ERR
exit 1
fi
case $c in
*PASSWORD*)
if [ "$PASSWORD" == "" ]; then
echo -n "Password: "
read -s PASSWORD
fi
;;
*);;
esac
# echo "couch=$c"
c=${c/PASSWORD/$PASSWORD}
c=${c// /%20}
which couchapp
couchapp push registry/shadow.js "$c" && \
couchapp push registry/app.js "$c" && \
couchapp push www/app.js "$c" && \
exit 0 || \
( ret=$?
echo "Failed with code $ret"
exit $ret )