Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Add-ons Site Suggestions



  • edited September 2006
    Here a script to to download an extension with wget:
    #!/bin/bash DIR_EXTENSION="/var/www/extensions/" OWNER="apache" GROUP_OWNER="apache" DEFAULT_DIR_MODE="2750" DEFAULT_FILE_MODE="640" tmp="/tmp/VanillaExtension" ADDON_ID=$1 wget --post-data=AddOnID=$ADDON_ID mkdir -p $tmp mv index.html?PostBackAction=DoDownload $tmp/extension$ pwd=$PWD cd $tmp unzip extension$ rm extension$ for x in *; do mv $x $DIR_EXTENSION chown -R "$OWNER":"$GROUP_OWNER" $DIR_EXTENSION/$x chmod -R $DEFAULT_DIR_MODE $DIR_EXTENSION/$x find $DIR_EXTENSION/$x -type f | xargs chmod $DEFAULT_FILE_MODE done cd $pwd rm -r $tmp
    this script take in argument the addon id
  • I found myself having to download a bunch of addons last night, so I wrote this ugly hack of a shell script:
    (NOTE: wget must have been compiled with debugging enabled for this to work)
    #!/bin/bash EXTENSION_NUM=$1 TEMPFILE=`tempfile --prefix=addon` FILENAME=`wget --debug -O $TEMPFILE\&AddOnID=$EXTENSION_NUM 2>&1 | grep 'Content-Disposition:' | perl -e '$_=<STDIN>;/filename=(.*)$/;print $1;'` if [ $FILENAME ]; then { mv $TEMPFILE "./$FILENAME" } else { echo Failed. rm $TEMPFILE } fi echo Extension number = $EXTENSION_NUM echo Filename = $FILENAME
This discussion has been closed.