~carloabelli/bin

0be1ba56e601a89867b6d165e36b11cc57b9265d — Carlo Abelli 7 months ago 7b3f779
backup modified system files
1 files changed, 12 insertions(+), 1 deletions(-)

M backup
M backup => backup +12 -1
@@ 10,12 10,23 @@ dir="$1"
comm -23 <(pacman -Qqe | sort) \
    <((echo base; pacman -Qqg base-devel) | sort) \
    > "$dir/packages.txt"

sudo rm -rf "$dir/system"
sudo mkdir -p "$dir/system"
sudo rsync -arR \
    --progress \
    $(pacman -Qii | awk '/^MODIFIED/ {print $2}') \
    $(sudo lostfiles) \
    "$dir/system"

mkdir -p "$dir/$(basename "$HOME")"
rsync -ar \
    --delete-excluded \
    --files-from="$HOME/.config/backup/config" \
    --filter ":-n .gitignore" \
    --progress \
    "$HOME" "$dir/$(basename "$HOME")"
    "$HOME" \
    "$dir/$(basename "$HOME")"

function is_btrfs_subvolume {
    local dir="$1"