Commit 881a2f43 authored by Vitaly Lipatov's avatar Vitaly Lipatov

move check for hasher and set HSH var to set_hasherdir

parent eeb379f9
...@@ -64,10 +64,8 @@ parse_cmd_pre "$@" -- ...@@ -64,10 +64,8 @@ parse_cmd_pre "$@" --
set_hasherdir set_hasherdir
[ -n "$TESTMODE" ] && HASHERDIR=$HASHERDIR-test [ -n "$TESTMODE" ] && HASHERDIR=$HASHERDIR-test
HSH=/usr/bin/hsh if [ -n "$TESTMODE" ] || [ -n "$AUTOMODE" ] ; then
if [ ! -x "$HSH" ] ; then HASHERDIR=$HASHERDIR-test
echo "Please install hasher package before use it"
exit 1
fi fi
# export OURAPTCONF with temp. file contains correct path to sources.list # export OURAPTCONF with temp. file contains correct path to sources.list
......
...@@ -59,13 +59,7 @@ set_hasherdir ...@@ -59,13 +59,7 @@ set_hasherdir
mkdir -p $LOGDIR $HASHERDIR || fatal "cannot mkdir" mkdir -p $LOGDIR $HASHERDIR || fatal "cannot mkdir"
check_locking check_locking
HSH=/usr/bin/hsh echog "List of packages for build: \$LISTNAMES"
if [ ! -x "$HSH" ] ; then
echo "Please install hasher package before use it"
exit 1
fi
echog "List of packages: \$LISTNAMES"
if [ -z "${LISTNAMES/*spec/}" ] ; then if [ -z "${LISTNAMES/*spec/}" ] ; then
echo "!!!!!!!!" echo "!!!!!!!!"
......
...@@ -7,6 +7,11 @@ load_mod rpm ...@@ -7,6 +7,11 @@ load_mod rpm
set_hasherdir() set_hasherdir()
{ {
HSH=/usr/bin/hsh
if [ ! -x "$HSH" ] ; then
fatal "Please install hasher package before use it"
fi
if [ -z "$HASHERBASEDIR" ] ; then if [ -z "$HASHERBASEDIR" ] ; then
warning "HASHERBASEDIR is not set. I will try with HASHERDIR, but you have to set HASHERBASEDIR in the config file" warning "HASHERBASEDIR is not set. I will try with HASHERDIR, but you have to set HASHERBASEDIR in the config file"
HASHERBASEDIR=$HASHERDIR HASHERBASEDIR=$HASHERDIR
......
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