Commit 4e2ddf6f authored by Vitaly Lipatov's avatar Vitaly Lipatov

run external scripts with system function path

parent 09b82b38
...@@ -14,7 +14,12 @@ set_eterbuilddir() ...@@ -14,7 +14,12 @@ set_eterbuilddir()
# if run from no system installation # if run from no system installation
ETERBUILDDIR=$(realpath `dirname $0`/../share/eterbuild) ETERBUILDDIR=$(realpath `dirname $0`/../share/eterbuild)
ETERBUILDETC=$(realpath `dirname $0`/../etc) ETERBUILDETC=$(realpath `dirname $0`/../etc)
echo "Note: run from source tree, datadir=$ETERBUILDDIR, sysconfdir=$ETERBUILDETC" if [ -r "$ETERBUILDETC/../AUTHORS" ] ; then
echo "Note: run from source tree, datadir=$ETERBUILDDIR, sysconfdir=$ETERBUILDETC"
else
ETERBUILDETC=/etc/eterbuild
ETERBUILDDIR=/usr/share/eterbuild
fi
fi fi
test -n "$ETERBUILDDIR" test -n "$ETERBUILDDIR"
# returns test result # returns test result
...@@ -169,7 +174,9 @@ set_incoming() ...@@ -169,7 +174,9 @@ set_incoming()
add_changelog_helper() add_changelog_helper()
{ {
# don't work sometime? # don't work sometime?
if ! tty -s && [ -z "$@" ] ; then # TODO: fix with $@, single arg?
local DESC SPEC
if ! tty -s && [ -z "$DESC" ] ; then
echo "skip changelog fixing without tty" echo "skip changelog fixing without tty"
return 1 return 1
fi fi
......
...@@ -14,11 +14,11 @@ eval_spec() ...@@ -14,11 +14,11 @@ eval_spec()
{ {
# Hack: just print spec if -bE failed # Hack: just print spec if -bE failed
# TODO: use rpm -showrc instead -bE for get main variables? # TODO: use rpm -showrc instead -bE for get main variables?
if is_alt ; then #if is_alt ; then
$RPMBUILD -bE --target $DEFAULTARCH $RPMBUILDARG $@ || fatal "Check spec's fields" # $RPMBUILD -bE --target $DEFAULTARCH $RPMBUILDARG $@ || fatal "Check spec's fields"
else #else
$RPMBUILD -bE --target $DEFAULTARCH $RPMBUILDARG $@ 2>/dev/null || cat $1 $RPMBUILD -bE --target $DEFAULTARCH $RPMBUILDARG $@ 2>/dev/null || cat $1
fi #fi
} }
get_release() get_release()
......
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