From 1a303e916f51ee20eefaae7fdc6554938c1ac733 Mon Sep 17 00:00:00 2001 From: Dylan Date: Mon, 1 Feb 2016 15:02:42 +1100 Subject: [PATCH] Swap to using getconf instead of integer overflow as it didn't work on Windows --- fetch | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/fetch b/fetch index 78bff369..dc28a03b 100755 --- a/fetch +++ b/fetch @@ -421,13 +421,12 @@ esac ascii_distro="$distro" getdistro () { - # Overflow integer to get architecture + # Get architecture if [ "$os_arch" == "on" ]; then - if ((1<<32)); then - distro+=" x86_64" - else - distro+=" x86" - fi + case "$(getconf LONG_BIT)" in + 64) distro+=" x86_64" ;; + 32) distro+=" x86" ;; + esac fi }