2
0
Fork 0
rootfs/usr/local/bin/sh.zio.update-rootfs

21 lines
392 B
Plaintext
Raw Normal View History

2023-08-15 18:01:53 +02:00
#!/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"
2023-08-15 18:01:53 +02:00
orig_dir="$(pwd)"
cd /
git fetch --all
git reset --hard origin/main
2023-08-15 18:01:53 +02:00
cd $orig_dir