Revision 098e5e50
Added by koszko over 1 year ago
upload_amo.sh | ||
---|---|---|
23 | 23 |
SECRET="$3" |
24 | 24 |
XPI_PATH="$4" |
25 | 25 |
|
26 |
escape_regex_special() { |
|
27 |
printf %s "$1" | sed 's/\([]\.*[-]\)/\\\1/g' |
|
28 |
} |
|
29 |
|
|
30 |
# Note: We don't actually parse JSON. We extract needed keys with sed regexes |
|
31 |
# which does not work in the general case but is sufficient for now. |
|
32 |
_get_json_key() { |
|
33 |
local KEY_REG="$(escape_regex_special "$1")" |
|
34 |
printf %s "$2" | |
|
35 |
awk '{printf "%s", $0}' | |
|
36 |
sed 's/^.*\("'"$KEY_REG"'"[[:space:]]*:[[:space:]]*"\([^"]*\)"\).*$/\2/' |
|
37 |
} |
|
38 |
|
|
39 |
get_json_key() { |
|
40 |
local JSON="$2" |
|
41 |
local VALUE="$(_get_json_key "$@")" |
|
42 |
if [ "x$VALUE" != "x$JSON" ]; then |
|
43 |
printf %s "$VALUE" |
|
44 |
fi |
|
45 |
} |
|
46 |
|
|
26 | 47 |
base64url() { |
27 | 48 |
printf %s "$1" | base64 -w 0 | tr '/+' '_-' | tr -d '=' |
28 | 49 |
} |
Also available in: Unified diff
remove unused shell_utils, update upload_amo.sh to still work
Even though upload_amo.sh scripts for extension signing is included, we're currently unable to use it because Firefox API keys needed for that require execution of nonfree JS and Jahoti's Mozoid tool is no longer working https://hydrillabugs.koszko.org/issues/111