修改离线部署脚本的路径
This commit is contained in:
parent
fe4e25193a
commit
5de3e946ae
@ -25,10 +25,21 @@ if [ ! -f /etc/centos-release ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get the absolute path of the project root directory
|
||||
PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
# Get script directory and project root
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(dirname "${SCRIPT_DIR}")"
|
||||
PROJECT_NAME="$(basename "${PROJECT_ROOT}")"
|
||||
|
||||
# Check if running from the correct directory
|
||||
if [ ! -f "${PROJECT_ROOT}/CMakeLists.txt" ] || \
|
||||
[ ! -d "${PROJECT_ROOT}/src" ] || \
|
||||
[ ! -d "${PROJECT_ROOT}/scripts" ]; then
|
||||
log_error "This script must be run from the project root directory (CollisionAvoidance)"
|
||||
log_error "Current directory: $(pwd)"
|
||||
log_error "Please run: cd /path/to/CollisionAvoidance && ./scripts/prepare_offline_packages.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create packages directory
|
||||
PACKAGES_DIR="${PROJECT_ROOT}/packages"
|
||||
log_info "Creating packages directory: ${PACKAGES_DIR}"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user