diff --git a/package.json b/package.json index bc24c1c4..d2e5b857 100644 --- a/package.json +++ b/package.json @@ -7,19 +7,19 @@ "author": "Ledger", "license": "MIT", "scripts": { - "postinstall": "./scripts/postinstall.sh", - "start": "./scripts/start.sh", - "release": "./scripts/release.sh", - "dist": "./scripts/dist.sh", - "dist:dir": "./scripts/dist-dir.sh", - "compile": "./scripts/compile.sh", + "postinstall": "bash ./scripts/postinstall.sh", + "start": "bash ./scripts/start.sh", + "release": "bash ./scripts/release.sh", + "dist": "bash ./scripts/dist.sh", + "dist:dir": "bash ./scripts/dist-dir.sh", + "compile": "bash ./scripts/compile.sh", "lint": "eslint src webpack .storybook", "flow": "flow", "prettier": "prettier --write \"{src,webpack,.storybook,static/i18n}/**/*.{js,json}\"", "ci": "yarn lint && yarn flow && yarn prettier", "storybook": "NODE_ENV=development STORYBOOK_ENV=1 start-storybook -s ./static -p 4444", - "publish-storybook": "./scripts/legacy/publish-storybook.sh", - "reset-files": "./scripts/legacy/reset-files.sh" + "publish-storybook": "bash ./scripts/legacy/publish-storybook.sh", + "reset-files": "bash ./scripts/legacy/reset-files.sh" }, "electronWebpack": { "title": true, diff --git a/scripts/helpers/run-job.sh b/scripts/helpers/run-job.sh index 809d5a6e..2631b240 100644 --- a/scripts/helpers/run-job.sh +++ b/scripts/helpers/run-job.sh @@ -3,6 +3,11 @@ # shellcheck disable=SC1091 source scripts/helpers/format.sh +operatingSystem=$(uname -s) +if [ "$operatingSystem" != Linux* ] && [ "$operatingSystem" != Darwin* ]; then + operatingSystem="Windows" +fi + function runJob { job=$1 @@ -11,6 +16,15 @@ function runJob { errMsg=$4 logLevel=$5 + # let's absolutely don't take care of this fake os + if [ "$operatingSystem" == "Windows" ]; then + local tmpScript=$(mktemp) + echo $job > "$tmpScript" + bash "$tmpScript" + rm "$tmpScript" + return $? + fi + tmpErrFile=$(mktemp) formatProgress "$progressMsg"