#!/bin/bash #TODO check repository persmissions for both kaido and config #TODO replace confdir with KAIDO_CONFIG_FOLDER source /opt/kaido/src/libs/bash/lib.sh # variables root="/opt/kaido" sysConfigDir="/etc/kaido" configDir="$KAIDO_CONFIG_FOLDER" # ---------- # kaido repository cd $root sudo git reset --hard sudo git pull if [ -d "$sysConfigDir" ]; then cd /etc/kaido sudo git reset --hard sudo git pull fi if [ ! "$configDir" = "$sysConfigDir" ]; then cd $configDir git reset --hard git pull fi exit 0