Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #We need verification that user is running this script as root.
- if [ "$USER" != "root" ]; then
- echo "You are attempting to execute this process as user $USER"
- echo "Please execute the script with elevated permissions."
- exit 1
- fi
- #To ensure that all package lists are up to date. This is set to update the packages silenty unless there
- #are any errors.
- apt-get -qq -y update
- #The script will now perform an aptitude search for the package(s) and install if not found.
- if (aptitude search '!~i chrpath'); then
- apt-get install chrpath
- if (aptitude search '~i chrpath'); then
- echo "CHRPATH INSTALLED CORRECTLY"
- else
- echo "CHRPATH DID NOT INSTALL CORRECTLY"
- fi
- else echo "chrpath is already installed"
- fi
Advertisement
Add Comment
Please, Sign In to add comment