Add more command checks

This commit is contained in:
Kron4ek 2022-04-11 15:08:42 +05:00 committed by GitHub
parent 3611017c71
commit 8813e12b4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Dependencies: wget tar gzip
# Dependencies: wget tar gzip grep sha256sum
# Root rights are required
if [ $EUID != 0 ]; then
@ -19,6 +19,16 @@ if ! command -v gzip 1>/dev/null; then
exit 1
fi
if ! command -v grep 1>/dev/null; then
echo "grep is required!"
exit 1
fi
if ! command -v sha256sum 1>/dev/null; then
echo "sha256sum is required!"
exit 1
fi
script_dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
mount_chroot () {