mirror of
https://gitlab.com/Snogard/kaido.git
synced 2025-08-20 02:40:10 +02:00
30 lines
536 B
Bash
Executable File
30 lines
536 B
Bash
Executable File
#!/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 |