From 21a878de5ae330a0572dc59045f47484f8f33261 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 26 Jan 2016 22:31:00 +1100 Subject: [PATCH] getdisk: Add Windows support and fix BSD detection --- fetch | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/fetch b/fetch index 82ba364a..da5cef37 100755 --- a/fetch +++ b/fetch @@ -1009,10 +1009,15 @@ getdisk () { if type -p df >/dev/null 2>&1; then # df flags case "$os" in - "Linux") df_flags="-h --total" ;; + "Linux" | "Windows") df_flags="-h --total" ;; "Mac OS X") df_flags="-H /" ;; - "FreeBSD") df_flags="-h -c" ;; - *) disk="Unknown"; return ;; + + *"BSD") + case "$os" in + "FreeBSD") df_flags="-h -c" ;; + *) disk="Unknown"; return ;; + esac + ;; esac # Get the disk info