+} elsif ($Config{osname} =~ /^darwin/i or $ENV{MACOS}) {
+ $0 =~ s:(.*)/:: and $ENV{PATH} .= ":$1";
+ $fexhome = $ENV{FEXHOME} || $ENV{HOME}.'/.fex';
+ $tmpdir = $ENV{FEXTMP} || $ENV{TMPDIR} || "$fexhome/tmp";
+ $idf = "$fexhome/id";
+ $_ = `sw_vers -productVersion 2>/dev/null`||'';
+ chomp;
+ $useragent = "fexget-$version (MacOS $_)";