# Source this file. # Environment variables: RLSE=version, e.g. 13.1 or 42.1. ARCH=architecture # Do e.g. RLSE=42.1 . /s1/SuSE/source.me # It sets these shell variables: # di Distro root, e.g. /s1/SuSE # sd SuSE main distro, e.g. /s1/SuSE/SuSE/x86_64/42.1 # bs SuSE Build Service, e.g. /s1/SuSE/SuSE-build/x86_64/42.1 # cn/mn Local software, e.g. /s1/SuSE/CouchNet/x86_64/42.1 # sbs Script to download RPMs from the SuSE Build Service (arg: URL) # mkr Script to rebuild distro metadata (arg: ditro root e.g. $bs) ddirs=(/s1/SuSE /home/ftp/pub) for f in ${ddirs[*]} ; do if [ -d $f ] ; then di=$f break fi done if [ -z "$di" ] ; then echo "ERROR, no repo directory, found none of ${ddirs[*]}" 1>&2 else arch=`uname -m` if [ "$arch" = "i686" ] ; then arch=i586 ; fi if [ -n "$ARCH" ] ; then arch=$ARCH ; fi rlsea=($di/SuSE-build/$arch/[0-9]*.[0-9]) rlse=${rlsea[${#rlsea[*]}-1]##*/} if [ -n "$RLSE" ] ; then rlse=$RLSE ; fi neta=(Mathnet CouchNet) netv=(mn cn) math=0 for f in ${neta[*]} ; do if [ -d $di/$f ] ; then eval ${netv[$math]}=$di/$f/$arch/$rlse break fi math=`expr $math + 1` done if [ $math -ge ${#neta[*]} ] ; then echo "ERROR, which network? Found none of $di/(${neta[*]})" 1>&2 fi mkr=$di/bin/mksuserepo sbs=$di/bin/snarf-bs bs=$di/SuSE-build/$arch/$rlse sdcm=(SuSE-distro SuSE) math=0 for f in ${sdcm[*]} ; do if [ -d $di/$f ] ; then sd=$di/$f/$arch/$rlse break fi math=`expr $math + 1` done if [ $math -ge ${#sdcm[*]} ] ; then echo "ERROR, main distro, found none of ${sdcm[*]}" 1>&2 fi fi