chore: mbcpapp.sh: dont use /usr/bin as command check
command -v and or executing the binary itself is a good enough rudimentary check "fix" "nonexistent" command on Termux also drop redundant $JAVA Signed-off-by: fukiame <fukiame@proton.me>
This commit is contained in:
parent
023adce1a9
commit
5726882cc9
1 changed files with 5 additions and 10 deletions
|
|
@ -23,9 +23,8 @@ if [ -f /proc/sys/fs/binfmt_misc/WSLInterop ]; then
|
|||
fi
|
||||
|
||||
# Check if figlet exists or not
|
||||
if [ -x /usr/bin/figlet ]
|
||||
then
|
||||
FIGLET=/usr/bin/figlet
|
||||
if command -v figlet ; then
|
||||
FIGLET=figlet
|
||||
else
|
||||
echo "WARN : figlet not found, ignoring banner !"
|
||||
FIGLET=:
|
||||
|
|
@ -36,16 +35,12 @@ COMMIT='git rev-parse --short HEAD'
|
|||
|
||||
# Check if java exists on /usr/bin/java
|
||||
echo Checking if Java exists...
|
||||
if [ -x /usr/bin/java ]
|
||||
then
|
||||
JAVA=/usr/bin/java
|
||||
if java -version ; then
|
||||
clear
|
||||
else
|
||||
echo "ERROR : Java not found on [/usr/bin/java] !!!"
|
||||
echo "ERROR : Java not found !!!"
|
||||
echo "INFO : Please install Java for your Linux distribution ! "
|
||||
echo "INFO : If you have different JDK location, be sure link it"
|
||||
exit
|
||||
JAVA=:
|
||||
exit 127
|
||||
fi
|
||||
|
||||
# Banner
|
||||
|
|
|
|||
Loading…
Reference in a new issue