view SCRIPTS/update-all.sh @ 109:c4758b1b1089

Support linux32 builds from linux64 host; fix mistaken misidentification of all plugins as VamPy plugins
author Chris Cannam
date Tue, 08 Sep 2015 11:35:05 +0100
parents 793467b5e61c
children
line wrap: on
line source
#!/bin/bash

set -eu

# Run this from the top-level vamp-build-and-test directory

failed=/tmp/failed_$$
rm -f "$failed"
trap "rm -f $failed" 0

cat METADATA/repos.txt | grep -v '^#' | awk -F= '{ print $1, $2 }' |
    while read name loc; do
	if [ -d "$name"/.hg ]; then 
 	    ( cd $name ; hg pull && hg update ) || echo "$name" >> "$failed"
	elif [ -d "$name"/.git ]; then 
 	    ( cd $name ; git pull ) || echo "$name" >> "$failed"
	elif [ -d "$name" ]; then
	    echo "ERROR: Directory \"$name\" exists, but is not a git or hg repo" 1>&2
	    exit 1
	else
	    case "$loc" in
		*/hg/*)
		    hg clone "$loc" "$name" || echo "$name" >> "$failed";;
		*//git*)
		    git clone "$loc" "$name" || echo "$name" >> "$failed";;
		*)
		    echo "ERROR: Can't deduce repo type from URL \"$loc\"" 1>&2
		    exit 1;;
	    esac
	fi
    done

echo "Done"
if [ -f "$failed" ]; then
    echo "Failed repos:"
    cat "$failed"
fi