Skip to content

Commit

Permalink
add some command checks for simple-prep
Browse files Browse the repository at this point in the history
  • Loading branch information
daringer committed Sep 11, 2021
1 parent 8ffccd3 commit 1393020
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions simple_prepare_harddrive.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/bin/bash

for cmd in bash sudo parted mkfs.ext4 mkdir mount chown umount chmod; do
if !(which $cmd > /dev/null); then
echo "FAIL: missing command: '$cmd'"
exit;
fi
done

if [[ "$1" = "" || "$2" != "" ]]; then
echo "usage: $0 <disk-device>"
exit 1
Expand Down

0 comments on commit 1393020

Please sign in to comment.