diff options
author | Alexis Christoforides <alexis@thenull.net> | 2017-04-27 18:13:32 +0300 |
---|---|---|
committer | Alexis Christoforides <alexis@thenull.net> | 2017-04-27 18:13:50 +0300 |
commit | 7a1a832f6577ffb12d4d302d2868a5b1aaa5ec65 (patch) | |
tree | 203f61e6a2d5b5092cd2421e475d428e334c41cb /packaging/MacSDK | |
parent | f75e5b4bc3c3964137c68cf854c1201c5adc3762 (diff) |
[MacSDK] Minor corrections on package's postinstall script
Diffstat (limited to 'packaging/MacSDK')
-rwxr-xr-x | packaging/MacSDK/packaging/resources/postinstall | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packaging/MacSDK/packaging/resources/postinstall b/packaging/MacSDK/packaging/resources/postinstall index 5ad19adf1df..b599c9e10e7 100755 --- a/packaging/MacSDK/packaging/resources/postinstall +++ b/packaging/MacSDK/packaging/resources/postinstall @@ -24,8 +24,8 @@ WHITELIST=$(cat "$(dirname "$0")/whitelist.txt") MONO_COMMANDS_FILE=/etc/paths.d/mono-commands FW_WHITELISTED_COMMANDS=${FW_CURRENT}/Commands -mkdir ${FW_WHITELISTED_COMMANDS} -mkdir /etc/paths.d +mkdir -p ${FW_WHITELISTED_COMMANDS} +mkdir -p $(dirname ${MONO_COMMANDS_FILE}) if test -e ${MONO_COMMANDS_FILE}; then rm "${MONO_COMMANDS_FILE}" @@ -37,8 +37,11 @@ if [ -d "${FW}"/Commands ]; then for i in ${WHITELIST}; do if test -e "${FW}/Commands/${i}"; then ln -s "${FW}/Commands/${i}" "${FW_WHITELISTED_COMMANDS}/${i}" + #Cleanup any old symlinks in /usr/local/bin that we used to install + rm -rf "/usr/local/bin/${i}" fi done; + eval $(/usr/libexec/path_helper -s) else echo "${FW}/Commands does not exist" echo "Can not add command links to $PATH." |