Updates
This commit is contained in:
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
DIR="$(cd -- "$(dirname -- "$0")" && pwd)"
|
||||
|
||||
if ! XCB=$(pkg-config --cflags --libs xcb 2>/dev/null); then
|
||||
echo "Error: lib-xcb not found. Please install lib-xcb." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! xrandr --version >/dev/null; then
|
||||
echo "Error: xrandr not found. Please install xrandr." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
gcc -shared -fPIC -Wall -Wextra -o "$DIR/X-kutu.so" "$DIR/X-kutu.c" $XCB
|
||||
|
||||
if [ ! -f "$DIR/X-kutu.so" ]; then
|
||||
echo "Error: compilation failed." >&2
|
||||
exit 1
|
||||
else
|
||||
echo "Success: $DIR/X-kutu.so is compiled."
|
||||
fi
|
||||
Reference in New Issue
Block a user