diff options
author | Googler <noreply@google.com> | 2016-09-19 16:43:05 +0000 |
---|---|---|
committer | Laszlo Csomor <laszlocsomor@google.com> | 2016-09-20 06:45:44 +0000 |
commit | 2b137e8735fc90d09fc998373e7ae15d34bb9f9c (patch) | |
tree | 49921a297ba4ba01ec6d724e41ab06057875127d /src/tools/xcode | |
parent | 836bda02c59c3c75d6d87f87ffe70935ba2e2af9 (diff) |
Compute hash of path instead, then create symlink only if it doesn't exist.
--
MOS_MIGRATED_REVID=133594609
Diffstat (limited to 'src/tools/xcode')
-rwxr-xr-x | src/tools/xcode/libtool/libtool.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/xcode/libtool/libtool.sh b/src/tools/xcode/libtool/libtool.sh index 722e9bb318..059056eb15 100755 --- a/src/tools/xcode/libtool/libtool.sh +++ b/src/tools/xcode/libtool/libtool.sh @@ -30,9 +30,11 @@ WRAPPER="${MY_LOCATION}/xcrunwrapper.sh" # file path. function hash_objfile() { ORIGINAL_NAME="$1" - ORIGINAL_HASH="$(/sbin/md5 -q "${ORIGINAL_NAME}")" + ORIGINAL_HASH="$(/sbin/md5 -qs "${ORIGINAL_NAME}")" SYMLINK_NAME="${ORIGINAL_NAME%.o}_${ORIGINAL_HASH}.o" - ln -sf "$(basename "$ORIGINAL_NAME")" "$SYMLINK_NAME" + if [[ ! -e "$SYMLINK_NAME" ]]; then + ln -sf "$(basename "$ORIGINAL_NAME")" "$SYMLINK_NAME" + fi echo "$SYMLINK_NAME" } |