From 9f277d4af044257fde8e046b9b7d58f1fa7d93a2 Mon Sep 17 00:00:00 2001 From: Felix Pankratz Date: Sat, 13 Aug 2022 17:38:42 +0200 Subject: [PATCH] fix build script --- build-ff.sh | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/build-ff.sh b/build-ff.sh index 908eb9d..db2873e 100644 --- a/build-ff.sh +++ b/build-ff.sh @@ -2,14 +2,19 @@ PWD=$(pwd) BASE_DIR=${PWD}/base MANIFEST_DIR=${PWD}/firefox -OUT="../out/artifacts/firefox/extension.zip" +OUTPUT_DIR=${PWD}/out/artifacts/firefox +OUTPUT_FILE=${OUTPUT_DIR}/extension.zip echo $BASE_DIR echo $MANIFEST_DIR -echo $OUT -rm -f ${OUT} -cd "$BASE_DIR" || return -zip -r ${OUT} * -cd "${MANIFEST_DIR}" || return -zip -r ${OUT} manifest.json +mkdir -p ${OUTPUT_DIR} + +# check if file exists before removing +[ -f ${OUTPUT_FILE} ] && rm -f ${OUTPUT_FILE} + +pushd ${BASE_DIR} +zip -r ${OUTPUT_FILE} * +popd +pushd ${MANIFEST_DIR} +zip ${OUTPUT_FILE} manifest.json