-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·53 lines (42 loc) · 1.3 KB
/
install.sh
File metadata and controls
executable file
·53 lines (42 loc) · 1.3 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
set -e
echo "=== Pome Local Installer ==="
# Directories
INSTALL_DIR="$HOME/.pome"
BIN_DIR="$HOME/.local/bin"
LIB_DIR="$INSTALL_DIR/lib"
INCLUDE_DIR="$INSTALL_DIR/include"
MODULES_DIR="$INSTALL_DIR/modules"
BUILD_DIR="build_new"
echo "[1/4] Building Pome..."
# Ensure build_new exists and is configured for Release
cmake -B "$BUILD_DIR" -DCMAKE_BUILD_TYPE=Release
cmake --build "$BUILD_DIR" --config Release
echo "[2/4] Installing to $INSTALL_DIR..."
mkdir -p "$BIN_DIR"
mkdir -p "$LIB_DIR"
mkdir -p "$INCLUDE_DIR"
mkdir -p "$MODULES_DIR"
# Install binaries
cp "$BUILD_DIR/pome" "$BIN_DIR/"
cp "$BUILD_DIR/pome-lsp" "$BIN_DIR/"
cp "$BUILD_DIR/pome-fmt" "$BIN_DIR/"
chmod +x "$BIN_DIR/pome" "$BIN_DIR/pome-lsp" "$BIN_DIR/pome-fmt"
# Install library
if [ -f "$BUILD_DIR/libpome.so" ]; then
cp "$BUILD_DIR/libpome.so" "$LIB_DIR/"
elif [ -f "$BUILD_DIR/libpome.dylib" ]; then
cp "$BUILD_DIR/libpome.dylib" "$LIB_DIR/"
fi
echo "[3/4] Installing Headers..."
cp include/*.h "$INCLUDE_DIR/"
echo "[4/4] Finalizing..."
echo ""
echo "=== Installation Complete! ==="
echo "Binaries installed to: $BIN_DIR"
echo "Resources installed to: $INSTALL_DIR"
echo ""
echo "Make sure '$BIN_DIR' is in your PATH."
echo "Example: export PATH=\"$PATH:$BIN_DIR\""
echo ""
echo "You can now run 'pome', 'pome-lsp', and 'pome-fmt'."