Last active
January 30, 2024 12:30
-
-
Save dpanter/618af3479d2273a84fb3d5dd02d65e0c to your computer and use it in GitHub Desktop.
git-gamescope.sh - Easily download, build and install latest gamescope master from Github
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# git-gamescope.sh | |
# Easily download, build and install latest gamescope master from Github | |
# Created 2023-04-21 - updated 2024-01-30 | |
# Written for Siduction (Debian sid based distro) | |
# By dpanter https://gist.github.com/dpanter | |
# Meson install requires elevated privileges | |
# Dependency list https://github.com/ValveSoftware/gamescope/issues/838 | |
PROJECT="gamescope" | |
RUNDATE="`date +%Y%m%d`" | |
COMMIT="`curl -v --silent https://github.com/ValveSoftware/gamescope/commits/master 2>&1 | grep -m 1 '"/ValveSoftware/gamescope/commit/' | awk -F"/commit/" '{print $2}' | cut -c 1-7`" | |
# check if project/commit dir already exists, wildcarded rundate. if no match, download/build project | |
if [ ! -n "$(/bin/ls -d $PROJECT-*-$COMMIT)" ]; then | |
git clone https://github.com/ValveSoftware/gamescope.git $PROJECT-$RUNDATE-$COMMIT | |
cd $PROJECT-$RUNDATE-$COMMIT | |
git submodule update --init | |
meson build/ | |
ninja -C build/ | |
meson install -C build/ --skip-subprojects | |
#if project/commit dir already exists, print message and quit | |
else | |
echo "Directory for latest commit already exists: $(/bin/ls -d $PROJECT-*-$COMMIT)" | |
echo "No actions taken this run." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment