Bug 1848414 - On update, don't overwrite existing ChannelPrefs or UpdateSettings Frameworks r=bhearsum,nalexander

Differential Revision: https://phabricator.services.mozilla.com/D198898
This commit is contained in:
Robin Steuber 2024-02-21 18:50:35 +00:00
parent 67461fe283
commit dbd6c96f18

View file

@ -92,12 +92,14 @@ make_add_instruction() {
check_for_add_if_not_update() {
add_if_not_file_chk="$1"
if [ "$(basename "$add_if_not_file_chk")" = "channel-prefs.js" -o \
"$(basename "$add_if_not_file_chk")" = "update-settings.ini" ]; then
## "true" *giggle*
if [[ "$(basename "$add_if_not_file_chk")" = "channel-prefs.js" || \
"$add_if_not_file_chk" =~ (^|/)ChannelPrefs\.framework/ || \
"$(basename "$add_if_not_file_chk")" = "update-settings.ini" || \
"$add_if_not_file_chk" =~ (^|/)UpdateSettings\.framework/ ]]; then
## "true"
return 0;
fi
## 'false'... because this is bash. Oh yay!
## "false"
return 1;
}