diff --git a/apollo.sh b/apollo.sh index 490a955668392d879a74c60854972051506e56cb..2afe1e6c02dfaf95232d3709cd1389762d7dac71 100755 --- a/apollo.sh +++ b/apollo.sh @@ -63,20 +63,14 @@ function apollo_check_system_config() { function check_machine_arch() { # the machine type, currently support x86_64, aarch64 MACHINE_ARCH=$(uname -m) - - # Generate WORKSPACE file based on marchine architecture - if [ "$MACHINE_ARCH" == 'x86_64' ]; then - sed "s/MACHINE_ARCH/x86_64/g" WORKSPACE.in > WORKSPACE - elif [ "$MACHINE_ARCH" == 'aarch64' ]; then - sed "s/MACHINE_ARCH/aarch64/g" WORKSPACE.in > WORKSPACE - else + if [ "${MACHINE_ARCH}" != "x86_64" ] && [ "${MACHINE_ARCH}" != "aarch64" ]; then fail "Unknown machine architecture $MACHINE_ARCH" exit 1 fi #setup vtk folder name for different systems. VTK_VERSION=$(find /usr/include/ -type d -name "vtk-*" | tail -n1 | cut -d '-' -f 2) - sed -i "s/VTK_VERSION/${VTK_VERSION}/g" WORKSPACE + sed "s/VTK_VERSION/${VTK_VERSION}/g" WORKSPACE.in > WORKSPACE } function check_esd_files() {