function pl_getDistro() {
if [ -f "/etc/redhat-release" ] ; then
distro=$(awk ' { print $1 } ' /etc/redhat-release)
- if [ $distro="Red" ] ; then
- distro="Redhat"
- fi
+ case $distro in Red*) distro="Redhat" ; esac
else
echo "build.common.pl_getDistro-unknown"
exit 1
pkgsfile=$1; shift
pkgspath=""
- # if config dir is missing but a .svnpath exists
- if [[ -f "$builddir/config.${pldistro}.svnpath" && ! -d "$builddir/config.${pldistro}" ]] ; then
- echo 1>&2 "Invoking make to extract remote config.${pldistro}"
- make 1>&2 --silent --no-print-directory -C $builddir stage1=true config.${pldistro}
+ # if config dir is missing but a .svnpath or a .gitpath exists, use it to extract the config dir
+ configdir="$builddir/config.${pldistro}"
+ if [ ! -d $configdir ] ; then
+ if [ -f "${configdir}.svnpath" -o -f "${configdir}.gitpath" ] ; then
+ echo 1>&2 "Invoking make to extract remote config.${pldistro}"
+ make 1>&2 --silent --no-print-directory -C $builddir stage1=true config.${pldistro}
+ fi
fi
# locate it
paths="$builddir/config.$pldistro/$pkgsfile $builddir/config.planetlab/$pkgsfile"