From 48fa948cc84394eeba8fe2bdb35d9fcd17352bbe Mon Sep 17 00:00:00 2001 From: Patrick Gehrsitz <58853838+mryel00@users.noreply.github.com> Date: Wed, 22 Nov 2023 16:38:35 +0100 Subject: [PATCH] chore: add update.sh Signed-off-by: Patrick Gehrsitz <58853838+mryel00@users.noreply.github.com> --- tools/update.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 tools/update.sh diff --git a/tools/update.sh b/tools/update.sh new file mode 100644 index 00000000..2beab9ee --- /dev/null +++ b/tools/update.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash + +#### crowsnest - A webcam Service for multiple Cams and Stream Services. +#### +#### Written by Stephan Wendel aka KwadFan +#### Copyright 2021 - till today +#### https://github.com/mainsail-crew/crowsnest +#### +#### This File is distributed under GPLv3 +#### + +# shellcheck enable=require-variable-braces + +### Disable SC2317 due Trap usage +# shellcheck disable=SC2317 + +# Exit on errors +set -Ee + +# Debug +# set -x + +pull_apps() { + printf "Pulling streamer repos ...\n" + for path in "${ALL_PATHS[@]}"; do + if [[ -d "${path}" ]]; then + printf "Pull '%s' ... \n" "${path##*/}" + pushd "${path}" &> /dev/null || exit 1 + git pull + popd &> /dev/null || exit 1 + printf "Pull '%s' ... [SUCCESS]\n" "${path##*/}" + fi + done + printf "Pulling streamer repos ... [SUCCESS]\n" +} + +main() { + . "${SRC_DIR}/bin/build.sh" + + pull_apps +} + +main "${@}" +exit 0