I haven't actually installed hdapm but this should do it. Make sure you have the hdapm disk image mounted otherwise this will fail!
Note: Anything starting with a '#' is a comment
Code:
# Wherever you see 'sudo' you are running the subsequent command as the root user.
# Be careful! As root you have full control over the system and it will not ask you if you type
# a command wrong, it will just do it.
# Creates the directory '/usr/local/bin' and any parent directories, if needed
# This command is non-destructive
sudo mkdir -p /usr/local/bin
#Copy hdapm from the mounted hdapm disk image to the
# /usr/local/bin folder
sudo cp /Volumes/hdapm/hdapm /usr/local/bin/hdapm
### BE VERY CAREFUL WITH THE BELOW COMMANDS ###
#Fix the permissions.
# chown changes the owners of files.
# The below commands marks the files as owned by the root user and the
# wheel group.
sudo chown root:wheel /usr/local/bin
sudo chown root:wheel /usr/local/bin/hdapm
# chmod changes the permissions users have for a file
# The below commands makes the files readable and executable
# to everyone while only allowing write access to the root user
#
# Permissions are specified in octal. Read = 4, Write = 2, Execute = 1
# Read, write and execute permissions: 4+2+1 = 7
# Read and execute: 4+1 = 5
# Position specifies who has what:
# 1st number: the user that owns the file (root in this case)
# 2nd number: the group that own the file (wheel in this case)
# 3rd number: everyone else
sudo chmod 755 /usr/local/bin
sudo chmod 755 /usr/local/bin/hdapm
Even after installing the tool you may not be able to use it off the bat as the system may not know that the folder '/usr/local/bin' contains things that it can run. To fix this, first run the below command and look for '/usr/local/bin' in the output:
If you find it, you're done. No changes are needed. If you don't see '/usr/local/bin' in the output, type:
Code:
touch ~/.bash_profile
open -a TextEdit ~/.bash_profile
Once TextEdit opens up, make sure it is in Plain Text mode and not RTF (or Real Text) mode. If TextEdit opened a blank file, just type in the below and save the file:
Code:
export PATH="/usr/local/bin:${PATH}"
If the file is NOT blank, do not change anything and post back.