-
-
Notifications
You must be signed in to change notification settings - Fork 1k
/
build-extension.sh
executable file
·35 lines (28 loc) · 969 Bytes
/
build-extension.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
dpkg -s zip &> /dev/null
if [ $? -ne 0 ]
then
echo "Installing zip"
sudo apt install zip
fi
dpkg -s jq &> /dev/null
if [ $? -ne 0 ]
then
echo "Installing jq"
sudo apt install jq
fi
npm install
npm update
npx rollup -c rollup.config.js
cp package.json package.copy.json
jq 'del(.dependencies."single-file-cli")' package.copy.json > package.json
zip -r singlefile-extension-source.zip manifest.json package.json _locales src rollup*.js .eslintrc.js build-extension.sh
mv package.copy.json package.json
rm singlefile-extension-firefox.zip
cp src/core/bg/config.js config.copy.js
cp src/core/bg/companion.js companion.copy.js
sed -i "" 's/forceWebAuthFlow: false/forceWebAuthFlow: true/g' src/core/bg/config.js
sed -i "" 's/enabled: true/enabled: false/g' src/core/bg/companion.js
zip -r singlefile-extension-firefox.zip manifest.json lib _locales src
mv config.copy.js src/core/bg/config.js
mv companion.copy.js src/core/bg/companion.js