Commit 76dc2cbc authored by Vitaly Lipatov's avatar Vitaly Lipatov

add etersoft specific functions (for release script)

parent ab380387
#!/bin/bash
# 2009 Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
# return local path to publish srpm
get_etersoft_srpm_path()
{
local SOURCE
local ALPHA=$2
local FTPBASE=/var/ftp
local SOURCEFTP=$(eval_spec $1 | get_var "Source$2")
if [ -z "$SOURCEFTP" ] ; then
build_rpms_name $1
SOURCEFTP=$(cat $1 | get_var "#Source$2" | subst_namever)
fi
[ -n "$SOURCEFTP" ] || fatal "Can't get Source from spec"
SOURCEFTP=$(dirname "$SOURCEFTP")
# remove tarball if exists at the end of line (our struct)
echo $SOURCEFTP | grep -q "tarball\$" && SOURCEFTP=$(dirname "$SOURCEFTP")
# translate ftp to local path
SOURCE=$(echo "$SOURCEFTP" | sed -e "s|ftp://.*etersoft.ru|$FTPBASE|g")
[ -d "$SOURCE" ] || fatal "Can't locate $SOURCE dir, translated from $SOURCEFTP"
# rewrite V.E.R./sources with $ALPHA/sources
if [ -n "$ALPHA" ] ; then
SOURCE=$(dirname $SOURCE)
SOURCE=$(dirname $SOURCE)/$ALPHA/sources
fi
mkdir -p $SOURCE || fatal "Can't create $SOURCE"
echo $SOURCE
}
set_last_link()
{
# do not change last if testing publish
echo $1 | grep -q /testing/sources && return
# do not change last if unstable publish
echo $1 | grep -q /unstable/sources && return
rm -f $1/../last
ln -s $VERSION $1/../last
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment