Last Updated: February 25, 2016
·
854
· iberianpig

Rewrite version of all metadata.json in Cinnamon Extension

When upgrating version of Cinnamon, extensions is not working often.
This tip makes such Cinnamon Extensions work well.

Create a shellscript

Create a shellscript file named rewriteVer.sh as following code

#!/bin/sh
var=`cinnamon --version | sed s/"Cinnamon "//g`
echo cinnamon --version: $var
echo rewriting version of Cinnamon Extension
perl -p -i.bk -e "s|\"cinnamon-version\": \[.*\]|\"cinnamon-version\": \[\"$var\"\]|gc" $HOME/.local/share/cinnamon/extensions/*/metadata.json

Edit Permission

$ sudo chmod 775 rewriteVer.sh

Run Script

$ rewriteVer.sh

Restart Cinnamon

press Alt + F2 and type r