Skip to content

Commit

Permalink
check size
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrfai committed Dec 15, 2023
1 parent 9c62cce commit 1845cf0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/mk-data-partition
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ if [ -z "$filename" ]; then
fi
filename=$(readlink -f $filename)

if expr "$size" : '^[0-9]\+$' >/dev/null; then
echo "Size $size should needs a unit like K, M, G, T"
exit 5
fi

if [ -n "$1" ] && [ X$copy = X ]; then
echo "If you want to copy directories, add -c"
exit 3
Expand Down

0 comments on commit 1845cf0

Please sign in to comment.