Automatically remove duplicate extensions
This commit is contained in:
parent
3c101093af
commit
287dd7dc25
|
@ -39,6 +39,17 @@ else
|
||||||
chmod -R a+rx "$EXTENSION_DIR";
|
chmod -R a+rx "$EXTENSION_DIR";
|
||||||
chmod -R u+w "$EXTENSION_DIR";
|
chmod -R u+w "$EXTENSION_DIR";
|
||||||
mkdir -p "$EXTENSION_POLICY_DIR";
|
mkdir -p "$EXTENSION_POLICY_DIR";
|
||||||
|
crxProperty="external_crx";
|
||||||
|
|
||||||
|
find "$EXTENSION_POLICY_DIR" -name "*.json" -print0 |
|
||||||
|
while IFS= read -r -d "" file
|
||||||
|
do
|
||||||
|
if [ "$(cat "$file" | jq -r ".$crxProperty")" == "$destination" ]
|
||||||
|
then
|
||||||
|
rm "$file";
|
||||||
|
fi;
|
||||||
|
done;
|
||||||
|
|
||||||
{
|
{
|
||||||
echo "{";
|
echo "{";
|
||||||
echo ' "external_crx": "'"$destination"'",';
|
echo ' "external_crx": "'"$destination"'",';
|
||||||
|
|
Loading…
Reference in a new issue