refactor lnpm.sh