summaryrefslogtreecommitdiffabout
path: root/list.in
Side-by-side diff
Diffstat (limited to 'list.in') (more/less context) (ignore whitespace changes)
-rw-r--r--list.in68
1 files changed, 34 insertions, 34 deletions
diff --git a/list.in b/list.in
index 1452a9d..4198d3c 100644
--- a/list.in
+++ b/list.in
@@ -1,6 +1,6 @@
#! /bin/sh
# This file is part of BEAM
-# Copyright (C) 2012 Sergey Poznyakoff
+# Copyright (C) 2012-2014 Sergey Poznyakoff
#
# BEAM is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,12 +21,12 @@ set -e
set +e
if [ "$1" = "--wtf" ]; then
- wtf $(basename $0) list what is included in backups
- exit 0
+ wtf $(basename $0) list what is included in backups
+ exit 0
fi
help() {
- cat <<EOF
+ cat <<EOF
usage: $0
list what is included in backups
@@ -39,7 +39,7 @@ OPTIONS:
Report bugs to <@PACKAGE_BUGREPORT@>
EOF
- exit 0
+ exit 0
}
###########################################################
@@ -49,51 +49,51 @@ EOF
numbered_list=
while [ $# -ne 0 ]
do
- case $1 in
- -l|--number) numbered_list=1;;
- -h|--help) help;;
- -V|--version) print_version;;
- *) echo >&2 "$0: unrecognized option $1"; exit 1;;
- esac
- shift
+ case $1 in
+ -l|--number) numbered_list=1;;
+ -h|--help) help;;
+ -V|--version) print_version;;
+ *) echo >&2 "$0: unrecognized option $1"; exit 1;;
+ esac
+ shift
done
load_config
if [ -z "$backup_items" ]; then
- echo "Nothing is being backed up"
+ echo "Nothing is being backed up"
fi
delayed_exit=
loaded_types=
if test -n "$numbered_list"; then
- n=0
+ n=0
fi
prefix=
for item in $backup_items
do
- eval type=\$${item}_type
- if [ -z "$type" ]; then
- error "${item}_type not set"
- delayed_exit=1
- continue
- fi
- if echo "$loaded_types" | grep -wq $type; then
- :
- elif [ -x $libdir/${type}.sh ]; then
- . $libdir/${type}.sh || delayed_exit=1
- loaded_types="$loaded_files
+ eval type=\$${item}_type
+ if [ -z "$type" ]; then
+ error "${item}_type not set"
+ delayed_exit=1
+ continue
+ fi
+ if echo "$loaded_types" | grep -wq $type; then
+ :
+ elif [ -x $libdir/${type}.sh ]; then
+ . $libdir/${type}.sh || delayed_exit=1
+ loaded_types="$loaded_files
$type"
- else
- error "$libdir/${type}.sh not found"
- delayed_exit=1
- fi
+ else
+ error "$libdir/${type}.sh not found"
+ delayed_exit=1
+ fi
- if test -n "$numbered_list"; then
- n=$((n + 1))
- prefix="$n. "
- fi
- ${type}_list $item "$prefix" || delayed_exit=1
+ if test -n "$numbered_list"; then
+ n=$((n + 1))
+ prefix="$n. "
+ fi
+ ${type}_list $item "$prefix" || delayed_exit=1
done
test -n "$delayed_exit" && abend 1 "aborting"

Return to:

Send suggestions and report system problems to the System administrator.