I was bored, so I decided to make a shell script to automate the process of making a firefox extension work with all versions.
It was quite a learning experience, being my first decent shell script.Note that in all likelihood it sucks, and barely works. But it *does* do what it’s supposed to do. At least on my computer.
There are two ways to do it. Installation or no-install. For either one, download this. It is the actual script. To use it, put it and the .xpi extension (see my previous post on this) in the same folder. Note that there must be only ONE .xpi file in that directory. More than one will result in bad results and deleted files (the source extension is deleted).
Now, run ‘sudo chmod +x compatiblizer’ in that directory. Then, changing it is as easy as ./compatibilizer. The original extension will be deleted, and a new one, called compatibilized-ffx-extension.xpi.
Just install that as usual in Firefox. Again, see the original article for details.
For the install route, download this. Put it wherever you want, as long it is in the same dir as the other one. Now run ‘sudo chmod +x install_compatibilizer’.Now run ‘sudo ./install_compatibilizer’ to install it. These two files can now be deleted, or whatever you want to do with them.
To convert extensions, simply put the extension into a directory by itself and run compatibilizer while in that directory. The same result will be produced. This can be used forever now.
Now doing this is a *bit* easier, or at least more informative.
Note that older extensions tend to not work quite as well with the Betas as the Alphas. Bigger difference, I guess. Many do still work, and just need this change to run.
The original article (that this automates.
If you have problems, leave a comment. If you like it, leave a comment. Just leave a comment.
Full contents of script:
#Daniel’s Firefox extension compatibilizer!
#Warning! This script is untested on anything but my computer. However, it uses only standard system tools, so it should be fine anywhere.
echo ‘Starting extension compatibilizer.’
echo ‘Unzipping to temporary directory.’
unzip -q *.xpi -d temp/
cp install.rdf install.rdf.backup
echo ‘Replacing max version number…’
sed ‘s|.*|5.0|’ install.rdf
echo ‘Done replacing max version number’
zip -q -r temp.xpi *
echo ‘Remade extension.’
echo ‘Moving extension.’
mv temp.xpi ../compatibilized-ffx-extension.xpi
echo ‘Extension moved. Deleting temp dirs.’
rm -r temp
echo ‘Done! Install it and have fun.’
Filed under: Uncategorized |