From c128e75f5d587479c7abd4a140f2e842cd2b8f69 Mon Sep 17 00:00:00 2001 From: Danny Colin Date: Fri, 10 Apr 2020 14:08:21 -0400 Subject: [PATCH] fix build:jitsi scripts crash caused by a missing folder On a freshly install of the developer environment, the build:jitsi try to create a file in ./webapp with the cURL command. However, ./webapp folder doesn't exist and the build script crash. This patch makes sure the appropriate folder is created if it doesn't already exist Signed-off-by: Danny Colin --- package.json | 2 +- scripts/build-jitsi.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100755 scripts/build-jitsi.sh diff --git a/package.json b/package.json index d924ed746a..45f99265cf 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "clean": "rimraf lib webapp electron_app/dist", "build": "yarn clean && yarn build:genfiles && yarn build:compile && yarn build:types && yarn build:bundle", "build-stats": "yarn clean && yarn build:genfiles && yarn build:compile && yarn build:types && yarn build:bundle-stats", - "build:jitsi": "curl -s https://jitsi.riot.im/libs/external_api.min.js > ./webapp/jitsi_external_api.min.js", + "build:jitsi": "scripts/build-jitsi.sh", "build:res": "node scripts/copy-res.js", "build:genfiles": "yarn reskindex && yarn build:res && yarn build:jitsi", "build:modernizr": "modernizr -c .modernizr.json -d src/vector/modernizr.js", diff --git a/scripts/build-jitsi.sh b/scripts/build-jitsi.sh new file mode 100755 index 0000000000..5d4bdafe12 --- /dev/null +++ b/scripts/build-jitsi.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +if [[ ! -f "./webapp" ]]; then + mkdir "./webapp" +fi + +curl -s https://jitsi.riot.im/libs/external_api.min.js > ./webapp/jitsi_external_api.min.js