1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-09 12:22:33 +01:00
uBlock/tools/make-chromium.sh
Raymond Hill a4aced69dc
Reorganize platform directory to avoid Chromium-centric appearance
Though Firefox shares a lot of WebExtensions code with Chromium,
these platforms have their own specific code paths, for various
reasons.

The reorganization here makes it clear that Chromium platform is
just one flavor of WebExtensions, and as such all Chromium-specific
code paths should no longer be automatically pulled by other
platforms where these code paths are not needed.

Given that the filepath of many files changed, here is the
parent commit to quickly browse back to the previous directory
layout:

ec7db30b2f
2021-07-16 10:06:58 -04:00

39 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
#
# This script assumes a linux environment
echo "*** uBlock0.chromium: Creating web store package"
DES=dist/build/uBlock0.chromium
rm -rf $DES
mkdir -p $DES
echo "*** uBlock0.chromium: Copying common files"
bash ./tools/copy-common-files.sh $DES
# Chromium-specific
echo "*** uBlock0.chromium: Copying chromium-specific files"
cp platform/chromium/*.js $DES/js/
cp platform/chromium/*.html $DES/
cp platform/chromium/*.json $DES/
# Chrome store-specific
cp -R $DES/_locales/nb $DES/_locales/no
echo "*** uBlock0.chromium: Generating meta..."
python tools/make-chromium-meta.py $DES/
if [ "$1" = all ]; then
echo "*** uBlock0.chromium: Creating plain package..."
pushd $(dirname $DES/) > /dev/null
zip uBlock0.chromium.zip -qr $(basename $DES/)/*
popd > /dev/null
elif [ -n "$1" ]; then
echo "*** uBlock0.chromium: Creating versioned package..."
pushd $(dirname $DES/) > /dev/null
zip uBlock0_"$1".chromium.zip -qr $(basename $DES/)/*
popd > /dev/null
fi
echo "*** uBlock0.chromium: Package done."