Compiling VirtualBox with error “makeself (variable makeself) not found!”
by huyuhui from LinuxQuestions.org on (#4XEPV)
I compiled VirtualBox with error makeself (variable makeself) not found! on SLES15.1.
The value of $MAKESELF was makeself, which was already initiated, and below lines were already added into global user profile.
Code:alias makeself=`/opt/makeself-2.4.0/makeself.sh`
export MAKESELF=/opt/makeself-2.4.0/I am confused on how to let check_avail() return true and pass the IF check in check_makeself(). Please advise and thanks in advance.
Code:check_makeself()
{
test_header "makeself"
if check_avail "$MAKESELF" makeself; then
makeself_ver=`$MAKESELF --version|grep version|sed 's+^Makeself.*version \([0-9\.]*\).*+\1+'`
if [ $? -ne 0 ]; then
log_failure "makeself not working"
fail
else
log_success "found version $makeself_ver"
cnf_append "VBOX_MAKESELF" "`which_wrapper $MAKESELF`"
fi
fi
}
test_header()
{
echo "***** Checking $1 *****" >> $LOG
$ECHO_N "Checking for $1: "
}
check_avail()
{
if [ -z "$1" ]; then
log_failure "$2 is empty"
fail $3
return 1
elif which_wrapper $1 > /dev/null; then
return 0
else
log_failure "$1 (variable $2) not found"
fail $3
return 1
fi
}


The value of $MAKESELF was makeself, which was already initiated, and below lines were already added into global user profile.
Code:alias makeself=`/opt/makeself-2.4.0/makeself.sh`
export MAKESELF=/opt/makeself-2.4.0/I am confused on how to let check_avail() return true and pass the IF check in check_makeself(). Please advise and thanks in advance.
Code:check_makeself()
{
test_header "makeself"
if check_avail "$MAKESELF" makeself; then
makeself_ver=`$MAKESELF --version|grep version|sed 's+^Makeself.*version \([0-9\.]*\).*+\1+'`
if [ $? -ne 0 ]; then
log_failure "makeself not working"
fail
else
log_success "found version $makeself_ver"
cnf_append "VBOX_MAKESELF" "`which_wrapper $MAKESELF`"
fi
fi
}
test_header()
{
echo "***** Checking $1 *****" >> $LOG
$ECHO_N "Checking for $1: "
}
check_avail()
{
if [ -z "$1" ]; then
log_failure "$2 is empty"
fail $3
return 1
elif which_wrapper $1 > /dev/null; then
return 0
else
log_failure "$1 (variable $2) not found"
fail $3
return 1
fi
}