mirror of
https://github.com/lisanet/PiShrink-macOS.git
synced 2026-02-18 02:55:52 +00:00
Check for additional required commands
This commit is contained in:
parent
e3ff4d20aa
commit
8331faf8f3
12
pishrink.sh
12
pishrink.sh
@ -29,11 +29,13 @@ if (( EUID != 0 )); then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
#Check that what we need is installed
|
#Check that what we need is installed
|
||||||
which parted 2>&1 >/dev/null
|
for command in parted losetup tune2fs md5sum e2fsck resize2fs; do
|
||||||
if (( $? != 0 )); then
|
which $command 2>&1 >/dev/null
|
||||||
echo "ERROR: parted is not installed."
|
if (( $? != 0 )); then
|
||||||
exit -4
|
echo "ERROR: $command is not installed."
|
||||||
fi
|
exit -4
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
#Copy to new file if requested
|
#Copy to new file if requested
|
||||||
if [ -n "$2" ]; then
|
if [ -n "$2" ]; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user