Install Date: Use a separate case for MacOS ls

This commit is contained in:
Muhammad Herdiansyah 2017-10-15 07:21:40 +07:00
parent 75148f63ee
commit f6c362f5a1

View file

@ -2254,12 +2254,12 @@ get_install_date() {
return return
;; ;;
*"HLOPRSTUWabc"*) # macOS ls
install_date="$(ls -dlctUT "$install_file" | awk '{printf $9 " " $6 " "$7 " " $8}')"
;;
*) *)
if [[ "$os" == "Mac OS X" ]]; then install_date="$(ls -dlctT "$install_file" | awk '{printf $9 " " $6 " " $7 " " $8}')"
install_date="$(ls -dlctUT "$install_file" | awk '{printf $9 " " $6 " "$7 " " $8}')"
else
install_date="$(ls -dlctT "$install_file" | awk '{printf $9 " " $6 " " $7 " " $8}')"
fi
;; ;;
esac esac