From 4ecaae94054c4eb919ddbd45904d834383a09558 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Fri, 22 May 2009 14:50:52 +0200 Subject: Make all indentation consistent. Previously, there were many indentation styles in use: Real tabs, 2, 3 or 4 spaces, mixing these within the same file, function or even within a single line. This commit changes all bash scripts in the handlers, src and lib dirs to use consistent indentation: three spaces are now used everywhere. Other files (e.g. Makefiles) are left untouched. Additionally, this commit removes all trailing whitespace. --- handlers/tar.helper.in | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'handlers/tar.helper.in') diff --git a/handlers/tar.helper.in b/handlers/tar.helper.in index cc9a89b..2665382 100644 --- a/handlers/tar.helper.in +++ b/handlers/tar.helper.in @@ -14,7 +14,7 @@ tar_wizard() { inputBox "$tar_title" "\"Name\" of backups" "$backupname" [ $? = 1 ] && return tar_backupname="backupname = $REPLY" - backupname="$REPLY" + backupname="$REPLY" inputBox "$tar_title" "Directory where to store the backups" "/net/backups/$backupname" [ $? = 1 ] && return @@ -24,8 +24,8 @@ tar_wizard() { "none" "do not filter trough" off \ "compress" "filter trough compress" off \ "gzip" "filter trough gzip" off \ - "bzip" "filter trough bzip" on - [ $? = 1 ] && return; + "bzip" "filter trough bzip" on + [ $? = 1 ] && return; result="$REPLY" tar_compress="compress = $REPLY " @@ -47,14 +47,14 @@ tar_wizard() { [ $? = 0 ] || return 1 tar_includes="includes = " for i in $REPLY; do - [ -n "$i" ] && tar_includes="$tar_includes $i" + [ -n "$i" ] && tar_includes="$tar_includes $i" done done REPLY= while [ -z "$REPLY" ]; do formBegin "$tar_title: Excludes" - formItem "Exclude:" /tmp + formItem "Exclude:" /tmp formItem "Exclude:" /proc formItem "Exclude:" /sys formItem "Exclude:" /dev @@ -63,17 +63,17 @@ tar_wizard() { formItem "Exclude:" /misc formItem "Exclude:" /net formItem "Exclude:" /selinux - formItem "Exclude:" + formItem "Exclude:" formItem "Exclude:" formDisplay [ $? = 0 ] || return 1 tar_excludes="excludes = " for i in $REPLY; do - [ -n "$i" ] && tar_excludes="$tar_excludes $i" + [ -n "$i" ] && tar_excludes="$tar_excludes $i" done done -# Save the config +# Save the config get_next_filename $configdirectory/10.tar cat > $next_filename < Date: Fri, 22 May 2009 15:27:09 +0200 Subject: Add a vim modeline with indentation settings. The modelines added match the emacs lines already present and also set the filetype to sh (just like the emacs lines). --- handlers/dup.helper.in | 1 + handlers/dup.in | 1 + handlers/ldap.helper.in | 1 + handlers/ldap.in | 1 + handlers/maildir.in | 1 + handlers/makecd.helper.in | 1 + handlers/makecd.in | 1 + handlers/mysql.helper.in | 1 + handlers/mysql.in | 1 + handlers/pgsql.helper.in | 1 + handlers/pgsql.in | 1 + handlers/rdiff.helper.in | 1 + handlers/rdiff.in | 1 + handlers/rsync.in | 2 ++ handlers/sh.in | 1 + handlers/svn.in | 1 + handlers/sys.helper.in | 1 + handlers/sys.in | 1 + handlers/tar.helper.in | 1 + handlers/tar.in | 1 + handlers/trac.in | 1 + handlers/wget | 2 ++ lib/easydialog.in | 1 + lib/tools.in | 1 + lib/vserver.in | 1 + src/backupninja.in | 1 + src/ninjahelper.in | 1 + src/ninjareport.in | 1 + 28 files changed, 30 insertions(+) (limited to 'handlers/tar.helper.in') diff --git a/handlers/dup.helper.in b/handlers/dup.helper.in index 86745c8..3c08a2f 100644 --- a/handlers/dup.helper.in +++ b/handlers/dup.helper.in @@ -1,4 +1,5 @@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: HELPERS="$HELPERS dup:incremental_encrypted_remote_filesystem_backup" diff --git a/handlers/dup.in b/handlers/dup.in index 60a4ce9..aed6030 100644 --- a/handlers/dup.in +++ b/handlers/dup.in @@ -1,4 +1,5 @@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: # # duplicity script for backupninja # requires duplicity diff --git a/handlers/ldap.helper.in b/handlers/ldap.helper.in index 4870ae4..4154cc6 100644 --- a/handlers/ldap.helper.in +++ b/handlers/ldap.helper.in @@ -1,4 +1,5 @@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: HELPERS="$HELPERS ldap:ldap_database_backup" diff --git a/handlers/ldap.in b/handlers/ldap.in index 0b0166e..5f402c7 100644 --- a/handlers/ldap.in +++ b/handlers/ldap.in @@ -1,4 +1,5 @@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: # # openldap backup handler script for backupninja # diff --git a/handlers/maildir.in b/handlers/maildir.in index e88619d..ab72ce1 100644 --- a/handlers/maildir.in +++ b/handlers/maildir.in @@ -1,4 +1,5 @@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: ############################################################### # diff --git a/handlers/makecd.helper.in b/handlers/makecd.helper.in index c8a6762..ad0c4aa 100644 --- a/handlers/makecd.helper.in +++ b/handlers/makecd.helper.in @@ -1,4 +1,5 @@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: HELPERS="$HELPERS makecd:makecd_backup" wizardname="makecd action wizard" diff --git a/handlers/makecd.in b/handlers/makecd.in index 78e5454..d44bba3 100644 --- a/handlers/makecd.in +++ b/handlers/makecd.in @@ -1,4 +1,5 @@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: # # burncd handler script for backupninja # diff --git a/handlers/mysql.helper.in b/handlers/mysql.helper.in index fb9f11d..997f73c 100644 --- a/handlers/mysql.helper.in +++ b/handlers/mysql.helper.in @@ -1,4 +1,5 @@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: HELPERS="$HELPERS mysql:mysql_database_backup" diff --git a/handlers/mysql.in b/handlers/mysql.in index a4a3667..88ffb1a 100644 --- a/handlers/mysql.in +++ b/handlers/mysql.in @@ -1,4 +1,5 @@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: # # mysql handler script for backupninja # diff --git a/handlers/pgsql.helper.in b/handlers/pgsql.helper.in index 48bf047..ff1cfd4 100644 --- a/handlers/pgsql.helper.in +++ b/handlers/pgsql.helper.in @@ -1,4 +1,5 @@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: HELPERS="$HELPERS pgsql:postgresql_database_backup" diff --git a/handlers/pgsql.in b/handlers/pgsql.in index b7e4262..ff5f7ba 100644 --- a/handlers/pgsql.in +++ b/handlers/pgsql.in @@ -1,4 +1,5 @@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: # # PostgreSQL handler script for backupninja # diff --git a/handlers/rdiff.helper.in b/handlers/rdiff.helper.in index c673723..83f2fb5 100644 --- a/handlers/rdiff.helper.in +++ b/handlers/rdiff.helper.in @@ -1,4 +1,5 @@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: HELPERS="$HELPERS rdiff:incremental_remote_filesystem_backup" diff --git a/handlers/rdiff.in b/handlers/rdiff.in index 51da1cc..f59d56a 100644 --- a/handlers/rdiff.in +++ b/handlers/rdiff.in @@ -1,4 +1,5 @@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: # # rdiff-backup handler script for backupninja # requires rdiff-backup diff --git a/handlers/rsync.in b/handlers/rsync.in index 9e5e4f9..072f2a6 100644 --- a/handlers/rsync.in +++ b/handlers/rsync.in @@ -1,3 +1,5 @@ +# -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: # # backupninja handler to do incremental backups using # rsync and hardlinks, based on diff --git a/handlers/sh.in b/handlers/sh.in index 4edfd9a..b070f3b 100644 --- a/handlers/sh.in +++ b/handlers/sh.in @@ -1,4 +1,5 @@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: # # shell script handler for backupninja # runs the file /etc/backup.d/scriptname.sh diff --git a/handlers/svn.in b/handlers/svn.in index 97d1701..5e5531a 100644 --- a/handlers/svn.in +++ b/handlers/svn.in @@ -1,4 +1,5 @@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: # # this handler will backup subversion repostitories. # diff --git a/handlers/sys.helper.in b/handlers/sys.helper.in index c823712..8a2fb07 100644 --- a/handlers/sys.helper.in +++ b/handlers/sys.helper.in @@ -1,4 +1,5 @@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: HELPERS="$HELPERS sys:general_hardware_and_system_info" diff --git a/handlers/sys.in b/handlers/sys.in index 2ab5871..69751ed 100755 --- a/handlers/sys.in +++ b/handlers/sys.in @@ -1,4 +1,5 @@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: # # this handler will save various reports of vital system information. # by default, all the reports are saved in /var/backups. diff --git a/handlers/tar.helper.in b/handlers/tar.helper.in index 2665382..cdbe03a 100644 --- a/handlers/tar.helper.in +++ b/handlers/tar.helper.in @@ -1,4 +1,5 @@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: HELPERS="$HELPERS tar:tar_backup" diff --git a/handlers/tar.in b/handlers/tar.in index 0a762ce..b4f8c58 100644 --- a/handlers/tar.in +++ b/handlers/tar.in @@ -1,4 +1,5 @@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: # # tar handler script for backupninja diff --git a/handlers/trac.in b/handlers/trac.in index f387d42..018bffd 100644 --- a/handlers/trac.in +++ b/handlers/trac.in @@ -1,4 +1,5 @@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: # # this handler will backup trac environments (based on the svn handler) # diff --git a/handlers/wget b/handlers/wget index 0c363eb..ebb391e 100644 --- a/handlers/wget +++ b/handlers/wget @@ -1,3 +1,5 @@ +# -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: # # backupninja handler to do incremental backups using # wget and hardlinks, based on rsync handler diff --git a/lib/easydialog.in b/lib/easydialog.in index a0495a7..c41e6f7 100644 --- a/lib/easydialog.in +++ b/lib/easydialog.in @@ -1,5 +1,6 @@ #!@BASH@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: # copyright 2002 lmoore@tump.com under the terms of the GNU LGPL. # additions 2005 collective@riseup.net diff --git a/lib/tools.in b/lib/tools.in index 0d368b8..929826b 100644 --- a/lib/tools.in +++ b/lib/tools.in @@ -1,5 +1,6 @@ #!@BASH@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: # This file contains functions shared between ninjahelper and backupninja. diff --git a/lib/vserver.in b/lib/vserver.in index cc96a71..b356b2b 100644 --- a/lib/vserver.in +++ b/lib/vserver.in @@ -1,4 +1,5 @@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: ##################################################### ## VSERVERS RELATED FUNCTIONS FOR NINJAHELPER diff --git a/src/backupninja.in b/src/backupninja.in index ca5074c..a158715 100755 --- a/src/backupninja.in +++ b/src/backupninja.in @@ -1,5 +1,6 @@ #!@BASH@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: # # |\_ # B A C K U P N I N J A /()/ diff --git a/src/ninjahelper.in b/src/ninjahelper.in index 7bbef1f..2a7faa9 100755 --- a/src/ninjahelper.in +++ b/src/ninjahelper.in @@ -1,5 +1,6 @@ #!@BASH@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: #################################################### ## Functions diff --git a/src/ninjareport.in b/src/ninjareport.in index 56a7209..4bc244e 100755 --- a/src/ninjareport.in +++ b/src/ninjareport.in @@ -1,5 +1,6 @@ #!@BASH@ # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*- +# vim: set filetype=sh sw=3 sts=3 expandtab autoindent: # # # Ninjareport - generate a single simple report for a lot of hosts -- cgit v1.2.3