{"id":242,"date":"2009-07-19T09:23:25","date_gmt":"2009-07-19T16:23:25","guid":{"rendered":"http:\/\/sp2hari.com\/?p=242"},"modified":"2020-06-20T08:31:12","modified_gmt":"2020-06-20T08:31:12","slug":"install-multiple-firefox-plugins","status":"publish","type":"post","link":"https:\/\/sp2hari.com\/index.php\/2009\/07\/19\/install-multiple-firefox-plugins\/","title":{"rendered":"Install multiple firefox extensions"},"content":{"rendered":"<p>I&#8217;m a full time web developer now. Million thanks to Firefox, web development is made much much easier. To make the web development process easier, there are many many extensions.<\/p>\n<p>A few of them I use for my development,<\/p>\n<p>1. Firebug<br \/>\n2. Web Developer<br \/>\n3. ColorZilla<br \/>\n4. MeasureIt<br \/>\n5. ViewSourceChart<br \/>\n6. FireCookie<br \/>\n7. YSlow<br \/>\n8. Delicious.<br \/>\n9. Twitterfox<br \/>\n10. CSS Viewer<\/p>\n<p>One problem I face when I have to work in a new machine or a new user account is installing these extensions. Not that I face this problem everyday, but this is something which is very irritating. One simple solution will be to backup the extensions folder and protect it safely, so that I can use it on any machine I use. Finally, I wrote a simple shell script which does this job.<\/p>\n<blockquote><p>\n#!\/bin\/bash<br \/>\ndeclare -a EXT LINK<\/p>\n<p>#Let us populate the extension and the link for the extension here<\/p>\n<p>EXT[0]=&#8221;ColorZilla&#8221;<br \/>\nEXT[1]=&#8221;Firebug&#8221;<br \/>\nEXT[2]=&#8221;WebDeveloper&#8221;<br \/>\nEXT[3]=&#8221;MeasureIt&#8221;<br \/>\nEXT[4]=&#8221;ViewSourceChart&#8221;<br \/>\nEXT[5]=&#8221;CSSViewer&#8221;<br \/>\nEXT[6]=&#8221;FireCookie&#8221;<br \/>\nEXT[7]=&#8221;YSlow&#8221;<br \/>\nEXT[8]=&#8221;SenSEO&#8221;<br \/>\nEXT[9]=&#8221;Delicious&#8221;<br \/>\nEXT[10]=&#8221;Twitterfox&#8221;<\/p>\n<p>LINK[0]=&#8221;https:\/\/addons.mozilla.org\/en-US\/firefox\/downloads\/latest\/271\/addon-271-latest.xpi&#8221;<br \/>\nLINK[1]=&#8221;https:\/\/addons.mozilla.org\/en-US\/firefox\/downloads\/latest\/1843\/addon-1843-latest.xpi&#8221;<br \/>\nLINK[2]=&#8221;https:\/\/addons.mozilla.org\/en-US\/firefox\/downloads\/latest\/60\/addon-60-latest.xpi&#8221;<br \/>\nLINK[3]=&#8221;https:\/\/addons.mozilla.org\/en-US\/firefox\/downloads\/latest\/539\/addon-539-latest.xpi&#8221;<br \/>\nLINK[4]=&#8221;https:\/\/addons.mozilla.org\/en-US\/firefox\/downloads\/latest\/655\/addon-655-latest.xpi&#8221;<br \/>\nLINK[5]=&#8221;https:\/\/addons.mozilla.org\/en-US\/firefox\/downloads\/latest\/2104\/addon-2104-latest.xpi&#8221;<br \/>\nLINK[6]=&#8221;https:\/\/addons.mozilla.org\/en-US\/firefox\/downloads\/latest\/6683\/addon-6683-latest.xpi&#8221;<br \/>\nLINK[7]=&#8221;https:\/\/addons.mozilla.org\/en-US\/firefox\/downloads\/latest\/5369\/addon-5369-latest.xpi&#8221;<br \/>\nLINK[8]=&#8221;https:\/\/addons.mozilla.org\/en-US\/firefox\/downloads\/file\/57302\/senseo-0.8.9-fx.xpi&#8221;<br \/>\nLINK[9]=&#8221;https:\/\/addons.mozilla.org\/en-US\/firefox\/downloads\/latest\/3615\/addon-3615-latest.xpi&#8221;<br \/>\nLINK[10]=&#8221;https:\/\/addons.mozilla.org\/en-US\/firefox\/downloads\/latest\/5081\/addon-5081-latest.xpi&#8221;<\/p>\n<p>if [ ! -d &#8220;\/tmp\/firefoxext-$USER\/&#8221; ]<br \/>\nthen<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;echo &#8220;Creating directory in tmp&#8221;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;mkdir -p &#8220;\/tmp\/firefoxext-$USER\/&#8221;<br \/>\nfi<\/p>\n<p>i=0<br \/>\ncount=${#EXT[@]}<br \/>\nwhile [ &#8220;$i&#8221; -lt &#8220;$count&#8221; ]<br \/>\ndo<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;echo &#8220;Installing ${EXT[i]}&#8221;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;filename=`echo ${LINK[i]} | awk -F &#8220;\/&#8221; &#8216;{print $NF}&#8217;`;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;rm -rf &#8220;\/tmp\/firefoxext-$USER\/tmp&#8221;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;mkdir -p &#8220;\/tmp\/firefoxext-$USER\/tmp&#8221;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;if [ ! -f &#8220;\/tmp\/firefoxext-$USER\/$filename&#8221; ]<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;then<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &#8220;Downloading $filename&#8221;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wget &#8211;quiet -O &#8220;\/tmp\/firefoxext-$USER\/$filename&#8221; ${LINK[i]}<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;fi<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;unzip -qq -d &#8220;\/tmp\/firefoxext-$USER\/tmp&#8221; &#8220;\/tmp\/firefoxext-$USER\/$filename&#8221;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;fffolder=`cat &#8220;\/tmp\/firefoxext-$USER\/tmp\/install.rdf&#8221; | grep &#8220;em:id&#8221; | head -n 1 | awk -F &#8220;&gt;&#8221; &#8216;{print $2}&#8217; | awk -F &#8220;&lt;&#8221; &#8216;{print $1}&#8217;`<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;if [ -z $fffolder ]<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;then<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i=`echo $i+1 | bc`;&nbsp;&nbsp;&nbsp;&nbsp;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;continue;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;fi<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;for j in `ls -1 &#8220;$HOME\/.mozilla\/firefox&#8221;`<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;do<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if [ -d &#8220;$HOME\/.mozilla\/firefox\/$j&#8221; ]<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;then<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rm -rf &#8220;$HOME\/.mozilla\/firefox\/$j\/extensions\/$fffolder&#8221;&nbsp;&nbsp;&nbsp;&nbsp;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mkdir -p &#8220;$HOME\/.mozilla\/firefox\/$j\/extensions\/$fffolder&#8221;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cp -r &#8220;\/tmp\/firefoxext-$USER\/tmp\/&#8221;* &#8220;$HOME\/.mozilla\/firefox\/$j\/extensions\/$fffolder&#8221;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fi<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;done<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;i=`echo $i+1 | bc`;<br \/>\ndone<\/p><\/blockquote>\n<p>You can download the latest version of this script from <a href=\"http:\/\/sp2hari.com\/work\/installPlugins.latest.sh\">here<\/a>.<\/p>\n<p>Logic : Download the xpi file. Unzip it. Copy it to extensions folder.<\/p>\n<p>Disclaimer: Download and run the above script at your own risk. I have tested it with many cases. Worst case, this will remove all your extensions from all your profiles (OMG) (Happened to me once).  Also, I would advice you not to run this script in windows. I haven&#8217;t tested it there.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m a full time web developer now. Million thanks to Firefox, web development is made much much easier. To make the web development process easier, there are many many extensions. A few of them I use for my development, 1. Firebug 2. Web Developer 3. ColorZilla 4. MeasureIt 5. ViewSourceChart &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-242","post","type-post","status-publish","format-standard","hentry","category-code"],"_links":{"self":[{"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/posts\/242","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/comments?post=242"}],"version-history":[{"count":12,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/posts\/242\/revisions"}],"predecessor-version":[{"id":1360,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/posts\/242\/revisions\/1360"}],"wp:attachment":[{"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/media?parent=242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/categories?post=242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/tags?post=242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}