修改部署脚本

This commit is contained in:
Tian jianyong 2024-12-20 12:18:30 +08:00
parent 6bb7985965
commit a26742c34d
2 changed files with 12 additions and 5 deletions

View File

@ -29,10 +29,11 @@ fi
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(dirname "${SCRIPT_DIR}")"
# Install Python3 RPM packages
log_info "Installing Python3 RPM packages..."
# Install RPM packages
log_info "Installing RPM packages..."
cd "${PROJECT_ROOT}/deploy/rpm"
rpm -Uvh --nodeps *.rpm
# Install Python3 and its dependencies
rpm -Uvh --nodeps python3*.rpm
# Create work directory
WORK_DIR="/opt/collision_avoidance"

View File

@ -38,11 +38,17 @@ mkdir -p "${DEPLOY_DIR}/rpm"
log_info "Downloading Python3 RPM packages..."
cd "${DEPLOY_DIR}/rpm"
# Install yum-utils if not already installed
# Install required tools
log_info "Installing required tools..."
if ! command -v repotrack &> /dev/null; then
sudo yum install -y yum-utils
fi
if ! command -v cmake3 &> /dev/null; then
sudo yum install -y epel-release
sudo yum install -y cmake3
fi
# Download Python3 and dependencies
repotrack python3 python3-pip python3-devel
@ -52,7 +58,7 @@ cd "${PROJECT_ROOT}"
rm -rf build
mkdir build
cd build
cmake ..
cmake3 ..
make -j4
if [ $? -ne 0 ]; then