Skip to content

Commit

Permalink
Resolve minor issues + error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mayankk2308 committed Oct 19, 2018
1 parent 0f0e16a commit 2a94789
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions purge-wrangler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# purge-wrangler.sh
# Author(s): Mayank Kumar (mayankk2308, github.com / mac_editor, egpu.io)
# License: Specified in LICENSE.md.
# Version: 5.0.1
# Version: 5.0.2

# Invaluable Contributors
# ----- TB1/2 Patch
Expand Down Expand Up @@ -47,7 +47,7 @@ BIN_CALL=0
SCRIPT_FILE=""

# Script version
SCRIPT_MAJOR_VER="5" && SCRIPT_MINOR_VER="0" && SCRIPT_PATCH_VER="1"
SCRIPT_MAJOR_VER="5" && SCRIPT_MINOR_VER="0" && SCRIPT_PATCH_VER="2"
SCRIPT_VER="${SCRIPT_MAJOR_VER}.${SCRIPT_MINOR_VER}.${SCRIPT_PATCH_VER}"

# Script preference plist
Expand Down Expand Up @@ -266,7 +266,9 @@ create_launchagent() {
</array>
</dict>
</plist>"
AGENT_PLIST="/Users/${SUDO_USER}/Library/LaunchAgents/io.egpu.purge-wrangler-agent.plist"
AGENT_LOC="/Users/${SUDO_USER}/Library/LaunchAgents/"
mkdir -p "${AGENT_LOC}"
AGENT_PLIST="${AGENT_LOC}io.egpu.purge-wrangler-agent.plist"
echo "${AGENT}" > "${AGENT_PLIST}"
chown "${SUDO_USER}" "${AGENT_PLIST}"
}
Expand Down Expand Up @@ -508,7 +510,7 @@ patch_plist() {
COMMAND="${2}"
KEY="${3}"
VALUE="${4}"
$PlistBuddy -c "${COMMAND} ${KEY} ${VALUE}" "${TARGET_PLIST}"
$PlistBuddy -c "${COMMAND} ${KEY} ${VALUE}" "${TARGET_PLIST}" 2>/dev/null
}

# Install AMDLegacySupport.kext
Expand Down

0 comments on commit 2a94789

Please sign in to comment.