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.
alias makeself='/opt/makeself-2.4.0/makeself.sh'
export MAKESELF=/opt/makeself-2.4.0/
export PATH=$PATH:JAVA_HOME/bin:/opt/makeself-2.4.0/
And verified with below.
[CODE]james> which makeself
which: no makeself in (/home/james/bin:/usr/local/bin:/usr/bin:/bin:JAVA_HOME/bin:/opt/makeself-2.4.0/)
james> which makeself.sh
/usr/bin/makeself.sh
james> whereis makeself
makeself: /usr/bin/makeself.sh /opt/makeself-2.4.0/makeself.1 /opt/makeself-2.4.0/makeself.lsm /opt/makeself-2.4.0/makeself.sh
james> makeself
Usage: /opt/makeself-2.4.0/makeself.sh [params] archive_dir file_name label startup_script [args]
…[/CODE]
I am confused on how to let check_avail() return true and pass the IF check in check_makeself(). $MAKESELF is there and command makeself is also there. 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
}
yuhuihu
Posts: 1
Joined: 19. Feb 2020, 04:25
Top
[/CODE]