From 85902d98e831d79dfef1bd3cc7099c6dba806e8a Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Mon, 20 Jun 2011 16:38:57 -0400 Subject: repo-add: style cleanup Unify function braces to be top right opening, bottom left closing. Signed-off-by: Dave Reisner Signed-off-by: Dan McGee --- scripts/repo-add.sh.in | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index 14506dcf..4e2e4a70 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -93,8 +93,7 @@ write_list_entry() { fi } -find_pkgentry() -{ +find_pkgentry() { local pkgname=$1 local pkgentry for pkgentry in $tmpdir/$pkgname*; do @@ -117,8 +116,7 @@ get_delta_pkgname() { # write a delta entry # arg1 - path to delta file -db_write_delta() -{ +db_write_delta() { deltafile="$1" pkgname="$(get_delta_pkgname $deltafile)" @@ -150,8 +148,7 @@ db_write_delta() # remove a delta entry # arg1 - path to delta file -db_remove_delta() -{ +db_remove_delta() { deltafile="$1" filename=${deltafile##*/} pkgname="$(get_delta_pkgname $deltafile)" @@ -222,8 +219,7 @@ verify_signature() { # write an entry to the pacman database # arg1 - path to package -db_write_entry() -{ +db_write_entry() { # blank out all variables local pkgfile="$1" local pkgname pkgver pkgdesc csize size url arch builddate packager \ @@ -380,8 +376,7 @@ db_remove_entry() { return $notfound } # end db_remove_entry -check_repo_db() -{ +check_repo_db() { # ensure the path to the DB exists if [[ ! -d "${LOCKFILE%/*}" ]]; then error "$(gettext "%s does not exist or is not a directory.")" "${LOCKFILE%/*}" @@ -428,8 +423,7 @@ check_repo_db() fi } -add() -{ +add() { if [[ ! -f $1 ]]; then error "$(gettext "File '%s' not found.")" "$1" return 1 @@ -460,8 +454,7 @@ add() db_write_entry "$pkgfile" } -remove() -{ +remove() { if [[ ${1##*.} == "delta" ]]; then deltafile=$1 msg "$(gettext "Searching for delta '%s'...")" "$deltafile" @@ -485,8 +478,7 @@ remove() fi } -trap_exit() -{ +trap_exit() { echo error "$@" exit 1 -- cgit v1.2.3-24-g4f1b