if (!(pkg.match(/^file:\/\//)||pkg.match(/^https?:\/\/.+\.(tar\.gz|tgz)$/)||pkg.match(/^git(\+ssh|\+http|\+https)?:\/\/.+\.git$/))){
if (!(pkg.match(/^.+@(~||\^)?\d+\.\d+\.\d+$/)||pkg.match(/^file:\/\//)||pkg.match(/^https?:\/\/.+\.(tar\.gz|tgz)$/)||pkg.match(/^git(\+ssh|\+http|\+https)?:\/\/.+\.git$/))){
if (!(pkg.match(/^file:\/\//)||pkg.match(/^https?:\/\/.+\.(tar\.gz|tgz)$/)||pkg.match(/^git(\+ssh|\+http|\+https)?:\/\/.+\.git$/))){
if (!(pkg.match(/^.+@(~||\^)?\d+\.\d+\.\d+$/)||pkg.match(/^file:\/\//)||pkg.match(/^https?:\/\/.+\.(tar\.gz|tgz)$/)||pkg.match(/^git(\+ssh|\+http|\+https)?:\/\/.+\.git$/))){