#!/bin/sh shout() { echo "${0}: $@" >&2; } barf() { shout "fatal: $@"; exit 111; } safe() { "$@" || barf "cannot $@"; } here=`env - PATH=$PATH pwd` mypwd=${here%package} mypwd=${mypwd%/} sslfiles="conf-ssl compile/ssl.lib compile/ucspissl.a compile/ucspissl.h" home=`head -1 $mypwd/conf-ucspissl` [ -d $mypwd/compile ] || safe mkdir -p $mypwd/compile if [ -d $home ] then shout "Linking ucspi-ssl sources." for sfile in `echo $sslfiles` do if [ -f $home/$sfile ] then rm -f "$mypwd/compile/$sfile" 2>/dev/null safe ln -fs "$home/$sfile" "$mypwd/$sfile" safe ls -l "$mypwd/$sfile" else barf "ucspi-ssl file $sfile missing. s/qmail won't compile." fi done else barf "Can't find ucspi-ssl dir. Check 'conf-ucspissl'." fi exit 0