#!/bin/bash CORE="6.x" BASE_URL="http://updates.drupal.org/release-history" TARGET_BASE=/home/drupal/contrib CORE_BASE=/home/drupal/core UPDATE_XML_CONF=/etc/egscripts/update-xml.conf # Mode of operation LIST=0 READ=0 FIND=0 MISSING=0 CONTRIBLIST=0 DOWNLOAD=0 VERSIONLIST=0 AUTODOWNLOAD=0 usage() { cat <&2 continue fi infofile="$module/$module.info" if [ ! -f "$infofile" ] ; then infofile=`find $module/ -name '*.info' | head -n 1` if [ -z "$infofile" ] || [ ! -f "$infofile" ] ; then echo "Can't find a .info file for '$module'" >&2 continue fi fi echo -n $module awk -F= '/^version/{version=$2}END{print version}' $infofile | sed -e 's/"//g' done elif [ $MISSING -eq 1 ] ; then for module in * ; do if [ ! -L $module ] ; then continue fi target=`readlink $module` if [ ! -d "$target" ] ; then version=`basename $target` dirname=`dirname $target` module=`basename $dirname` if [ -z "$module" ] || [ -z "$version" ] ; then echo "Can't determine module info from symlink $target" >&2 continue fi get_module $module $version fi done else symlink_module $module $version fi