-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsource.sh
56 lines (48 loc) · 1.23 KB
/
source.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env bash
DEBUG=$1
SRCRELEASEDIR=${SRCRELEASEDIR:-source_release}
set -xeou pipefail
version="$(cat src/firefox_manifest.json | jq -r .version)"
inputs=(
src
build.sh
CHANGELOG.md
Dockerfile
chrome.sh
firefox.sh
LICENSE
make.sh
README.md
)
outputfn="source_kagi_privacypass_firefox_${version}"
unpacked_dir="${SRCRELEASEDIR}/unpacked_firefox"
rm -rf "$unpacked_dir" || true
mkdir -p "$unpacked_dir"
for item in ${inputs[@]}
do
cp -r "$item" "$unpacked_dir"
done
cp "src/firefox_manifest.json" "$unpacked_dir/src/manifest.json"
cp "src/popup/progress_bar_moz.css" "$unpacked_dir/src/popup/progress_bar.css"
inputs=(
privacypass-lib/src
privacypass-lib/build.sh
privacypass-lib/Dockerfile
privacypass-lib/LICENSE
privacypass-lib/README.md
)
mkdir -p "$unpacked_dir/privacypass-lib"
for item in ${inputs[@]}
do
cp -r "$item" "$unpacked_dir/privacypass-lib"
done
(cd "$unpacked_dir/privacypass-lib/src/" ; bash clean.sh)
if [ -z $DEBUG ];
then
# RELEASE: disable (by removing) debug buttons
rm "$unpacked_dir/src/popup/debug.js"
touch "$unpacked_dir/src/popup/debug.js"
fi
rm "$outputfn.zip" || true
rm "$outputfn.xpi" || true
cd "$unpacked_dir"; zip -r "../$outputfn.zip" * ; cd ..;