X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=btrbk-run;h=140f9e6053fdef509aace78d1186fee1c0abe26f;hb=28a58715872fc0f002f268369c82085da0e25b3f;hp=c33ed66904832bff7ecdcf0b5873413098395ed5;hpb=ff877dc70b2f4f5622bf7dad3441c633b9ea1168;p=distro-setup diff --git a/btrbk-run b/btrbk-run index c33ed66..140f9e6 100644 --- a/btrbk-run +++ b/btrbk-run @@ -413,6 +413,26 @@ fi echo "mountpoints: ${mountpoints[*]}" +uninstalled-file-die() { + err "uninstalled file $1. run install-my-scripts or rerun with -f" + exit 1 +} +if ! $force; then + install_bin_files=( + mount-latest-subvol + check-subvol-stale + btrbk-run + ) + for f in ${install_bin_files[@]}; do + if ! diff -q /a/bin/ds/$f /usr/local/bin/$f; then + uninstalled-file-die $f + fi + done + if ! diff -q /a/bin/errhandle/err /usr/local/lib/err; then + uninstalled-file-die err + fi +fi + # pull_reexec stops us from getting into an infinite loop if there is some # kind of weird problem