ia64/xen-unstable

annotate buildconfigs/select-repository @ 15841:c5f735271e22

[IA64] Foreign p2m: Fix vti domain builder.

It should set arch_domain::convmem_end.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Alex Williamson <alex.williamson@hp.com>
date Thu Sep 06 13:48:43 2007 -0600 (2007-09-06)
parents faef0f795490
children f6520678755a
rev   line source
ian@15279 1 #!/bin/sh
ian@15251 2
ian@15251 3 ME=$(basename $0)
ian@15251 4
ian@15251 5 if [ $# -lt 1 ] || [ $# -gt 2 ] ; then
ian@15251 6 echo "usage: $ME <repository-name> [search-path]" 1>&2
ian@15251 7 exit 1;
ian@15251 8 fi
ian@15251 9
ian@15251 10 REPO=$1
ian@15251 11 LINUX_SRC_PATH=$2
ian@15251 12
ian@15251 13 if [ X"${LINUX_SRC_PATH}" != X ] ; then
ian@15251 14 echo "$ME: Searching \`${LINUX_SRC_PATH}' for $REPO" 1>&2
ian@15251 15 IFS_saved="$IFS"
ian@15251 16 IFS=:
ian@15251 17 for i in $LINUX_SRC_PATH ; do
ian@15251 18 # Ignore current directory since we will almost certainly find
ian@15251 19 # the target directory there which breaks updating (there's no
ian@15251 20 # point updating from yourself!).
ian@15251 21 if [ X"." = X"${i}" ] ; then
ian@15251 22 echo "$ME: Ignoring \`.'" 1>&2
ian@15251 23 continue
ian@15251 24 fi
ian@15251 25
ian@15251 26 if [ -d "$i/$REPO/.hg" ] ; then
ian@15251 27 echo "$ME: Found $i/$REPO" 1>&2
ian@15251 28 echo "$i/$REPO"
ian@15251 29 exit 0
ian@15251 30 fi
ian@15251 31 done
ian@15251 32 IFS="$IFS_saved"
ian@15251 33 fi
ian@15251 34
ian@15251 35 XEN=$(hg -R ${XEN_ROOT} path default)
ian@15251 36 if [ $? -ne 0 ] || [ X"$XEN" = "X" ] ; then
ian@15251 37 echo "$ME: Unable to determine Xen repository parent." 1>&2
ian@15251 38 exit 1;
ian@15251 39 fi
ian@15251 40
ian@15251 41 BASE=$(dirname ${XEN})
ian@15279 42 if [ $? -ne 0 ] || [ X"$BASE" = "X" ] ; then
ian@15279 43 echo "$ME: Unable to determine Xen repository base." 1>&2
ian@15251 44 exit 1;
ian@15251 45 fi
ian@15279 46 if [ -d "$XEN" ] && [ ! -d "$BASE/$REPO" ] ; then
ian@15279 47 echo "$ME: No such dir: $BASE/$REPO" 1>&2
ian@15279 48 exit 1
ian@15279 49 fi
ian@15251 50
ian@15251 51 echo "$ME: Found ${BASE}/${REPO}" 1>&2
ian@15273 52
ian@15273 53 # If ${BASE}/${REPO} is a local directory then prepend file:// so that
ian@15273 54 # the test in src.hg-clone will fail and we will clone instead of
ian@15273 55 # linking this repository. We only want to link repositories which
ian@15273 56 # were found via LINUX_SRC_PATH.
ian@15273 57 if [ -d "${BASE}/${REPO}" ] ; then
ian@15273 58 echo "file://${BASE}/${REPO}"
ian@15273 59 else
ian@15273 60 echo ${BASE}/${REPO}
ian@15273 61 fi
ian@15251 62 exit 0