refactor screen-share-sway
* introduce variables for common values * properly quote variables * check if directories exist before certain steps * exit on cd failure
This commit is contained in:
parent
3eeb1e435e
commit
ea2e7fb770
@ -5,13 +5,18 @@
|
||||
|
||||
grep -q "alias obs" ~/.zshrc || echo 'alias obs="QT_QPA_PLATFORM=xcb obs"' >> ~/.zshrc
|
||||
|
||||
cd ~/utils
|
||||
V4L2_VERSION="0.12.5"
|
||||
U="$HOME/utils"
|
||||
|
||||
dotfiles/bin/v4l2pls 0.12.5
|
||||
# grab and build latest v4l2 module
|
||||
"$U"/dotfiles/bin/v4l2pls "$V4L2_VERSION"
|
||||
|
||||
# ref: https://github.com/obsproject/obs-studio/wiki/Install-Instructions#red-hatfedora-based-build-directions
|
||||
git clone --recursive https://github.com/obsproject/obs-studio.git
|
||||
cd ~/utils/obs-studio
|
||||
if [ ! -d "$U/obs-studio" ]; then
|
||||
cd "$U" || exit
|
||||
git clone --recursive https://github.com/obsproject/obs-studio.git
|
||||
fi
|
||||
cd "$U"/obs-studio || exit
|
||||
git pull
|
||||
git submodule update --recursive
|
||||
mkdir -pv build && cd build
|
||||
@ -20,24 +25,26 @@ make -j4
|
||||
sudo make install
|
||||
|
||||
|
||||
cd ~/utils
|
||||
|
||||
git clone https://github.com/CatxFish/obs-v4l2sink.git
|
||||
cd obs-v4l2sink
|
||||
if [ ! -d "$U/obs-v4l2sink" ]; then
|
||||
cd "$U" || exit
|
||||
git clone https://github.com/CatxFish/obs-v4l2sink.git
|
||||
fi
|
||||
cd "$U"/obs-v4l2sink || exit
|
||||
git pull
|
||||
|
||||
mkdir -pv build && cd build
|
||||
cmake -DLIBOBS_INCLUDE_DIR="../../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=~/.local ..
|
||||
make -j4
|
||||
make install
|
||||
cd ~/utils/obs-v4l2sink
|
||||
|
||||
cd ~/utils
|
||||
|
||||
hg clone https://hg.sr.ht/~scoopta/wlrobs
|
||||
cd wlrobs
|
||||
if [ ! -d "$U/wlrobs" ]; then
|
||||
cd "$U" || exit
|
||||
hg clone https://hg.sr.ht/~scoopta/wlrobs
|
||||
fi
|
||||
cd "$U"/wlrobs || exit
|
||||
hg pull
|
||||
meson build
|
||||
meson --reconfigure build
|
||||
ninja -C build
|
||||
mkdir -pv ~/.config/obs-studio/plugins/wlrobs/bin/64bit
|
||||
cp -v build/libwlrobs.so ~/.config/obs-studio/plugins/wlrobs/bin/64bit
|
||||
mkdir -pv "$HOME"/.config/obs-studio/plugins/wlrobs/bin/64bit
|
||||
cp -v build/libwlrobs.so "$HOME"/.config/obs-studio/plugins/wlrobs/bin/64bit
|
||||
|
Loading…
Reference in New Issue
Block a user