Fix -dev condition expression
refactor lnpm.sh