[test-release.sh] Do not run chrpath on AIX.
authorAmy Kwan <amy.kwan1@ibm.com>
Fri, 3 Dec 2021 21:35:57 +0000 (15:35 -0600)
committerAmy Kwan <amy.kwan1@ibm.com>
Fri, 3 Dec 2021 21:36:29 +0000 (15:36 -0600)
Upon testing the use of test-release.sh on AIX, the script initially fails
because chrpath is not present on AIX. This patch adds checks for AIX and allows
the script to continue running to completion.

Differential Revision: https://reviews.llvm.org/D115046

llvm/utils/release/test-release.sh

index 6d31619..3609557 100755 (executable)
@@ -307,7 +307,7 @@ function check_program_exists() {
   fi
 }
 
-if [ "$System" != "Darwin" -a "$System" != "SunOS" ]; then
+if [ "$System" != "Darwin" ] && [ "$System" != "SunOS" ] && [ "$System" != "AIX" ]; then
   check_program_exists 'chrpath'
 fi
 
@@ -457,7 +457,7 @@ function test_llvmCore() {
 # Clean RPATH. Libtool adds the build directory to the search path, which is
 # not necessary --- and even harmful --- for the binary packages we release.
 function clean_RPATH() {
-  if [ "$System" = "Darwin" -o "$System" = "SunOS" ]; then
+  if [ "$System" = "Darwin" ] || [ "$System" = "SunOS" ] || [ "$System" = "AIX" ]; then
     return
   fi
   local InstallPath="$1"