File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -34,11 +34,14 @@ function restore_func() {
3434
3535 # Ensure there's enough space to extract the archive on the device
3636 # Note: this is a very rough estimate as we're not taking the compression ratio into account
37- archive_size_kb=$( stat --printf=" %s" " $archive_path " | awk ' {print $1/1024}' )
38- if ! enough_free_space " ." " $archive_size_kb " ; then
39- cecho " Less than $archive_size_kb KB of free space available on the current directory - not enough to extract this backup."
40- cecho " Please free up some space and try again."
41- exit 1
37+ # This doesn't work on macOS so we'll skip it there
38+ if [[ " $( uname) " != " Darwin" ]]; then
39+ archive_size_kb=$( stat --printf=" %s" " $archive_path " | awk ' {print $1/1024}' )
40+ if ! enough_free_space " ." " $archive_size_kb " ; then
41+ cecho " Less than $archive_size_kb KB of free space available on the current directory - not enough to extract this backup."
42+ cecho " Please free up some space and try again."
43+ exit 1
44+ fi
4245 fi
4346
4447 cecho " Extracting archive."
You can’t perform that action at this time.
0 commit comments