File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 }
2525 else
2626 # Neither whiptail nor dialog are installed
27- echo " Error: Neither whiptail nor dialog are installed. Exiting ."
27+ echo " Neither whiptail nor dialog are installed, can't continue. Please refer to the README for usage instructions ."
2828 exit 1
2929 fi
3030fi
3131
32+ # Check if other dependencies are installed: adb, tar, pv, 7z
33+ # srm is optional so we don't check for it
34+ commands=(" tar" " pv" " 7z" " adb" )
35+ for cmd in " ${commands[@]} "
36+ do
37+ # adb is a function in WSL so we're using type instead of command -v
38+ if ! type " $cmd " & > /dev/null
39+ then
40+ echo " $cmd is not available, can't continue. Please refer to the README for usage instructions."
41+ exit 1
42+ fi
43+ done
44+
3245
3346SOURCE=" ${BASH_SOURCE[0]} "
3447while [ -h " $SOURCE " ]; do # resolve $SOURCE until the file is no longer a symlink
You can’t perform that action at this time.
0 commit comments