File: post-create.sh

package info (click to toggle)
xrootd-s3-http 0.6.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 792 kB
  • sloc: cpp: 10,247; sh: 898; makefile: 14
file content (34 lines) | stat: -rwxr-xr-x 764 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# Post-create script for dev container setup

set -e

echo "=== Setting up XRootD S3/HTTP Plugin Development Environment ==="

# Navigate to workspace
cd /workspaces/xrootd-s3-http

# Initialize pre-commit hooks
echo "Installing pre-commit hooks..."
pre-commit install

# Configure and build the project
echo "Configuring project with CMake..."

# Clean build directory contents if it exists (may be a volume mount)
if [ -d "build" ]; then
    sudo rm -rf build/* build/.[!.]* 2>/dev/null || true
    sudo chown -R vscode:vscode build 2>/dev/null || true
fi
mkdir -p build
cd build

cmake .. \
    -DENABLE_TESTS=ON \
    -DCMAKE_BUILD_TYPE=Debug \
    -G Ninja

echo "Building project..."
ninja -j$(nproc)

echo "=== Dev container setup complete ==="