From ad7f45231cb867990a03830ec09e0cd41959f539 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Wed, 24 Jun 2020 14:29:51 +0200 Subject: update --- .config/chromium-flags.conf | 6 ------ bin/backup | 14 ++++++-------- bin/byo | 2 +- 3 files changed, 7 insertions(+), 15 deletions(-) delete mode 100644 .config/chromium-flags.conf diff --git a/.config/chromium-flags.conf b/.config/chromium-flags.conf deleted file mode 100644 index a5ef947..0000000 --- a/.config/chromium-flags.conf +++ /dev/null @@ -1,6 +0,0 @@ ---disk-cache-dir=/tmp/cache ---enable-dom-distiller ---ignore-gpu-blacklist ---enable-gpu-rasterization ---enable-native-gpu-memory-buffers ---enable-zero-copy diff --git a/bin/backup b/bin/backup index 059f2dc..4ef83be 100755 --- a/bin/backup +++ b/bin/backup @@ -3,23 +3,21 @@ [ "$USER" = root ] || exec sudo "$0" "$@" -while getopts :Fv opt; do +while getopts :v opt; do case $opt in - (F|v) eval "opt$opt=$opt" ;; - (*) echo "Usage: $0 [-Fv] [[host:]dir]"; exit 1 ;; + (v) eval "opt$opt=$opt" ;; + (*) echo "Usage: $0 [-v] [[host:]dir]"; exit 1 ;; esac done shift $((OPTIND - 1)) dest=${1:-/.history} date=$(date +%Y%m%d_%H%M%S) -last=$(rsync --list-only $dest/ 2>/dev/null | cut -b 47- | tail -1) +last=$(rsync --list-only "$dest/" 2>/dev/null | cut -b 47- | tail -1) case $last in -(2*) opt_link=--link-dest=../$last;; +([12]*) opt_link=--link-dest=../$last;; (*) opt_link=;; esac -[ "$optF" ] && fsfreeze -f / && trap 'fsfreeze -u /' EXIT - -rsync -HSxa$optv --exclude-from=/etc/backup/ignore $opt_link / /boot $dest/$date +rsync -HSxa$optv --exclude-from=/etc/backup/ignore $opt_link / /boot "$dest/$date" diff --git a/bin/byo b/bin/byo index 173c2a7..71b7578 100755 --- a/bin/byo +++ b/bin/byo @@ -24,7 +24,7 @@ yoda_uuid='8c463221-6bb7-414e-9060-c9570bb3a6bb' dest=/mnt/backup/$(hostname) [ -b /dev/mapper/yoda ] && noclose=1 || cryptsetup open "$(blkid --uuid "$yoda_uuid")" yoda findmnt /dev/mapper/yoda /mnt >/dev/null && noumount=1 || mount /dev/mapper/yoda /mnt -time backup -Fv "$dest" +time backup -v "$dest" backup-clean -v "$dest" [ ! "$optd" ] || time duperemove -drh --hashfile="$dest/.hashfile" "$dest" [ ! "$optk" ] || noumount=1 noclose=1 -- cgit v1.2.3