From 311623359684e16347633a22c542f7bae9b4a844 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Mon, 9 Jan 2017 20:46:26 +0700 Subject: [PATCH] Install Date: Disable AIX ls --- neofetch | 2 ++ 1 file changed, 2 insertions(+) diff --git a/neofetch b/neofetch index 281d26f2..c2cb16c2 100755 --- a/neofetch +++ b/neofetch @@ -1865,6 +1865,7 @@ get_install_date() { *) install_file="/" ;; esac ;; + "AIX") install_file="/var/adm/ras/bosinstlog" ;; esac ls_prog="$(ls --version 2>&1)" @@ -1873,6 +1874,7 @@ get_install_date() { *"crtime"*) install_date="$(ls -tdcE "$install_file" | awk '{printf $6 " " $7}')" ;; # xpg4 (Solaris) *"ACFHLRSZ"*) install_date="$(ls -dl "$install_file" | awk '{printf $6 " " $7}')" ;; # Toybox *"GNU coreutils"*) install_date="$(ls -tcd --full-time "$install_file" | awk '{printf $6 " " $7}')" ;; + *"ACFHLNRS"*) err "Install Date doesn't work because your 'ls' does not support showing full date and time."; return ;; # AIX ls *) install_date="$(ls -dlctT "$install_file" | awk '{printf $9 " " $6 " "$7 " " $8}')" ;; esac