27 lines
481 B
Bash
Executable File
27 lines
481 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
if [[ "$(realpath "$(dirname "$(realpath -s "$0")")/../../../")" == "/" ]]; then
|
|
. /usr/local/libexec/zio/helpers/bash.sh
|
|
else
|
|
. "$(dirname "$(realpath -s "$0")")/../libexec/zio/helpers/bash.sh"
|
|
fi
|
|
|
|
# TODO: Check if we're actually using the rootfs git
|
|
|
|
test_root
|
|
test_prog "git"
|
|
|
|
say info "Fetching latest..."
|
|
|
|
orig_dir="$(pwd)"
|
|
cd /
|
|
|
|
git fetch --all
|
|
git reset --hard origin/main
|
|
|
|
cd $orig_dir
|
|
|
|
say info "Reloading daemons..."
|
|
|
|
systemctl daemon-reload
|