]> arthur.barton.de Git - ax-unix.git/blobdiff - bup/save-user/bup-save-user
bup-save-user: Always show existing saves in columns
[ax-unix.git] / bup / save-user / bup-save-user
index e341ca882cb7f07ce8f76c3d0366b0e270bc1a3c..9fd5bbf0e9e172132390d8c2d5c980bc7f83f3a3 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # bup-save-user -- Save user data using bup(1)
-# Copyright (c)2013-2014 Alexander Barton (alex@barton.de)
+# Copyright (c)2013-2016 Alexander Barton (alex@barton.de)
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -9,7 +9,7 @@
 # (at your option) any later version.
 #
 
-NAME=`basename "$0"`
+NAME=$(basename "$0")
 
 Usage()
 {
@@ -25,7 +25,7 @@ if [ ! -d "$HOME/.bup" ]; then
 fi
 
 paths="$HOME"
-[ -n "$LOCAL_HOME" -a "$LOCAL_HOME" != "$HOME" -a -d "$LOCAL_HOME" ] \
+[ -n "$LOCAL_HOME" ] && [ "$LOCAL_HOME" != "$HOME" ] && [ -d "$LOCAL_HOME" ] \
        && paths="$paths $LOCAL_HOME"
 [ -d "/var/spool/mail/$LOGNAME" ] \
        && paths="$paths /var/spool/mail/$LOGNAME"
@@ -37,6 +37,6 @@ bup index --update --xdev --exclude-rx="/.cache/." $paths || exit 1
 bup save --name "$LOGNAME" $paths
 exit_code=$?
 
-bup ls "$LOGNAME" || exit 1
+bup ls "$LOGNAME" || exit 1 | column
 
 exit $exit_code