From f70d5de54d2d0d175f0e5f70c591616e5657fcf9 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sat, 26 Mar 2022 17:53:28 +0100 Subject: [PATCH] Add btrfs-snapshot-compare --- .config/zsh/functions/ansi-colours | 0 .config/zsh/functions/btrfs-snapshot-compare | 11 +++++++++++ .config/zsh/functions/cat-highlight | 0 .config/zsh/functions/export-emacs | 0 .config/zsh/functions/gdb_get_backtrace | 0 .config/zsh/functions/mksmol | 0 .config/zsh/functions/putwww | 0 7 files changed, 11 insertions(+) mode change 100644 => 100755 .config/zsh/functions/ansi-colours create mode 100755 .config/zsh/functions/btrfs-snapshot-compare mode change 100644 => 100755 .config/zsh/functions/cat-highlight mode change 100644 => 100755 .config/zsh/functions/export-emacs mode change 100644 => 100755 .config/zsh/functions/gdb_get_backtrace mode change 100644 => 100755 .config/zsh/functions/mksmol mode change 100644 => 100755 .config/zsh/functions/putwww diff --git a/.config/zsh/functions/ansi-colours b/.config/zsh/functions/ansi-colours old mode 100644 new mode 100755 diff --git a/.config/zsh/functions/btrfs-snapshot-compare b/.config/zsh/functions/btrfs-snapshot-compare new file mode 100755 index 0000000..4c4a982 --- /dev/null +++ b/.config/zsh/functions/btrfs-snapshot-compare @@ -0,0 +1,11 @@ +#!/usr/bin/env zsh +# Compare 2 Btrfs snapshots + +if [[ ${ARGC} -lt 2 ]]; then + print -u 2 "Usage: ${0} " + return 1 +fi +local old="${1}" +local new="${2}" + +btrfs send --no-data -p "${old}" "${new}" | btrfs receive --dump diff --git a/.config/zsh/functions/cat-highlight b/.config/zsh/functions/cat-highlight old mode 100644 new mode 100755 diff --git a/.config/zsh/functions/export-emacs b/.config/zsh/functions/export-emacs old mode 100644 new mode 100755 diff --git a/.config/zsh/functions/gdb_get_backtrace b/.config/zsh/functions/gdb_get_backtrace old mode 100644 new mode 100755 diff --git a/.config/zsh/functions/mksmol b/.config/zsh/functions/mksmol old mode 100644 new mode 100755 diff --git a/.config/zsh/functions/putwww b/.config/zsh/functions/putwww old mode 100644 new mode 100755