#!/bin/bash

if $(npm whoami >/dev/null 2>&1); then
  echo 'Already logged in'
else
  if [ -z "${NPM_PASSWORD}" ]; then
    echo "${NPM_PASSWORD}"
  fi
  npm login
fi
