#!/usr/bin/env bash if [ $# -eq 0 ]; then echo "Usage: build [invidious|companion]" exit 1 fi mode=$1 if [ "$mode" == "invidious" ]; then cd build PATCHES=../patches/invidious/*.patch for p in $PATCHES; do echo "applying ${p}..." git apply --check $p && git apply $p done fi if [ "$mode" == "companion" ]; then cd companion PATCHES=../patches/companion/*.patch for p in $PATCHES; do echo "applying ${p}..." git apply --check $p && git apply $p done fi