# 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 (OSS) # sn SuSE non-OSS e.g. /s1/SuSE/SuSE-noss/x86_64/42.1 (Non-OSS) # su SuSE recent packages, /s1/SuSE/SuSE-update/x86_64/99.8 # bs SuSE Build Service, e.g. /s1/SuSE/SuSE-build/x86_64/42.1 # pm PackMan, e.g. /s1/SuSE/PackMan/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) # It also adds /s1/SuSE/bin to the path if not already there. 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 # The release is e.g. 9.3, 13.1, 42.1; using 99.8 for Tumbleweed. rlsea=($di/SuSE-build/$arch/[0-9]*.[0-9]) rlse=${rlsea[${#rlsea[*]}-1]##*/} if [ -n "$RLSE" ] ; then rlse=$RLSE ; fi # Are we on Mathnet or CouchNet? 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 # Script aliases mkr=$di/bin/mksuserepo sbs=$di/bin/snarf-bs bs=$di/SuSE-build/$arch/$rlse pm=$di/PackMan/$arch/$rlse sn=$di/SuSE-noss/$arch/$rlse sdcm=(SuSE-distro SuSE) math=0 for f in ${sdcm[*]} ; do if [ -d $di/$f ] ; then sd=$di/$f/$arch/$rlse su=$di/$f-update/$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 # Add $di/bin to the path if not already there. if [[ "$PATH" != *$di/bin* ]] ; then PATH=${PATH}:$di/bin fi fi