mirror of
https://github.com/MLBZ521/MacAdmin.git
synced 2026-06-11 03:40:32 +01:00
Merge pull request #13 from tantonw/tantonw-patch-1
M1 system_profiler "Upgradeable Memory" workaround
This commit is contained in:
@@ -139,7 +139,12 @@ os_check() {
|
||||
}
|
||||
|
||||
check_ram_upgradeable() {
|
||||
/usr/sbin/system_profiler SPMemoryDataType | /usr/bin/awk -F "Upgradeable Memory: " '{print $2}' | /usr/bin/xargs 2&> /dev/null
|
||||
ram_upgradeable=$( /usr/sbin/system_profiler SPMemoryDataType | /usr/bin/awk -F "Upgradeable Memory: " '{print $2}' | /usr/bin/xargs 2&> /dev/null )
|
||||
# M1 Macs don't return the "Upgradeable Memory:" attribute as of early 2022
|
||||
if [[ -z ${ram_upgradeable} ]]; then
|
||||
ram_upgradeable="No"
|
||||
fi
|
||||
echo "${ram_upgradeable}"
|
||||
}
|
||||
|
||||
# Check if the current RAM meets specs
|
||||
|
||||
Reference in New Issue
Block a user