pytorch/tools/amd_build/unwrap_clang.sh
Johannes M Dieterich 71d3457a1f Fix compiler unwrapping step in jenkins build scripts for Caffe2/PyTorch on ROCm (#25409)
Summary:
Fix the regex (requires enabling extglob) for two digit clang releases.

While there, also fix it for three digit releases with the hope that I
do not need to touch it for some time.

Unfortunately, this regex requires extglob to be enabled in the shell.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/25409

Differential Revision: D17431786

Pulled By: bddppq

fbshipit-source-id: a50b2ff525d9b6046deae9c8725c92d67119599a
2019-09-17 13:50:42 -07:00

10 lines
265 B
Bash

#!/bin/bash
shopt -s extglob
ORIG_COMP=/opt/rocm/hcc/bin/clang-*_original
# note that the wrapping always names the compiler "clang-7.0_original"
if [ -e $ORIG_COMP ]; then
WRAPPED=/opt/rocm/hcc/bin/clang-?([0-9])?([0-9])[0-9]
sudo mv $ORIG_COMP $WRAPPED
fi