Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/repo-add.sh.in
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2011-06-20 16:38:57 -0400
committerDan McGee <dan@archlinux.org>2011-06-22 11:22:36 -0500
commit85902d98e831d79dfef1bd3cc7099c6dba806e8a (patch)
tree37d4cebe08a17463741b897c5636fc6bac8c7ab8 /scripts/repo-add.sh.in
parent3d4bf3b3fdabb721ab4be23e6ca26e8fa5bb9806 (diff)
repo-add: style cleanup
Unify function braces to be top right opening, bottom left closing. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts/repo-add.sh.in')
-rw-r--r--scripts/repo-add.sh.in24
1 files 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