From 1b0d87d40f6adb6c9344bb4b152eed80b45a4fd5 Mon Sep 17 00:00:00 2001 From: C-3PO Date: Sun, 21 Oct 2018 04:52:36 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=E2=80=8D=E2=99=82=EF=B8=8F=20Add?= =?UTF-8?q?=20shebangs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 ++++---- package.json | 2 +- src/{ => funcs}/failWithError.ts | 0 src/getManifest.ts | 4 +++- src/getPatchZip.ts | 4 +++- src/getSolidpkg.ts | 4 +++- src/installPatch.ts | 4 +++- 7 files changed, 17 insertions(+), 9 deletions(-) rename src/{ => funcs}/failWithError.ts (100%) diff --git a/README.md b/README.md index bd87329..599cb34 100644 --- a/README.md +++ b/README.md @@ -24,10 +24,10 @@ complete -W 'assets_swtor_de_de assets_swtor_en_us assets_swtor_fr_fr assets_swt # Usage ```bash -node dist/getManifest.js assets_swtor_main -node dist/getSolidPkg.js assets_swtor_main 126 127 -node dist/getPatchZip.js --product assets_swtor_main --from 126 --to 127 -node dist/installPatch.js assets_swtor_main 126 127 +dist/getManifest.js assets_swtor_main +dist/getSolidPkg.js assets_swtor_main 126 127 +dist/getPatchZip.js --product assets_swtor_main --from 126 --to 127 +dist/installPatch.js assets_swtor_main 126 127 swtor_install assets_swtor_main 126 127 ``` diff --git a/package.json b/package.json index 6e01994..59595d6 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "main": "index.js", "scripts": { "preinstall": "rm -rf node_modules && rm -f package-lock.json", - "start": "rm -rf dist && tsc", + "start": "rm -rf dist && tsc && chmod +x dist/*.js", "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": { diff --git a/src/failWithError.ts b/src/funcs/failWithError.ts similarity index 100% rename from src/failWithError.ts rename to src/funcs/failWithError.ts diff --git a/src/getManifest.ts b/src/getManifest.ts index 6725d7d..df944c0 100644 --- a/src/getManifest.ts +++ b/src/getManifest.ts @@ -1,5 +1,7 @@ +#!/usr/bin/env node + import { getManifest, IManifest, Product, verifyProductName } from 'ssn'; -import failWithError from './failWithError'; +import failWithError from './funcs/failWithError'; const failFunction = failWithError.bind(null, 'node dist/getManifest.js '); diff --git a/src/getPatchZip.ts b/src/getPatchZip.ts index d60fb42..24225a8 100644 --- a/src/getPatchZip.ts +++ b/src/getPatchZip.ts @@ -1,6 +1,8 @@ +#!/usr/bin/env node + import { getPatchZip, ISsnFileEntry, Product, verifyProductName } from 'ssn'; import * as yargsParser from 'yargs-parser'; -import failWithError from './failWithError'; +import failWithError from './funcs/failWithError'; const failFunction = failWithError.bind(null, 'node dist/getPatchZip.js --product --from --to '); diff --git a/src/getSolidpkg.ts b/src/getSolidpkg.ts index 6b172ba..051a033 100644 --- a/src/getSolidpkg.ts +++ b/src/getSolidpkg.ts @@ -1,5 +1,7 @@ +#!/usr/bin/env node + import { getSolidpkg, ISolidSimple, Product, verifyProductName } from 'ssn'; -import failWithError from './failWithError'; +import failWithError from './funcs/failWithError'; const failFunction = failWithError.bind(null, 'node dist/getSolidpkg.js '); diff --git a/src/installPatch.ts b/src/installPatch.ts index fd3d6ac..bfed56c 100644 --- a/src/installPatch.ts +++ b/src/installPatch.ts @@ -1,5 +1,7 @@ +#!/usr/bin/env node + import { getPatch, Product, verifyProductName } from 'ssn'; -import failWithError from './failWithError'; +import failWithError from './funcs/failWithError'; const failFunction = failWithError.bind(null, 'node dist/installPatch.js ');