's'
This commit is contained in:
25
d2ypp2/scripts/linux/run_kmscube.sh
Normal file
25
d2ypp2/scripts/linux/run_kmscube.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
DEVICE="${KMSCUBE_DRM_DEVICE:-/dev/dri/card0}"
|
||||
|
||||
if ! command -v kmscube >/dev/null 2>&1; then
|
||||
echo "kmscube is not installed" >&2
|
||||
exit 127
|
||||
fi
|
||||
|
||||
if [ ! -e "$DEVICE" ]; then
|
||||
for candidate in /dev/dri/card*; do
|
||||
if [ -e "$candidate" ]; then
|
||||
DEVICE="$candidate"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ ! -e "$DEVICE" ]; then
|
||||
echo "No DRM card device found" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec kmscube -D "$DEVICE"
|
||||
Reference in New Issue
Block a user