summaryrefslogtreecommitdiffstats
path: root/db-update
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-12-19 14:40:07 +0100
committerPierre Schmitz <pierre@archlinux.de>2011-12-19 14:40:07 +0100
commit5c7220a4aa370d1f726eb27d99d8f9294646433d (patch)
tree699c4f1643fa94c26eb75c683ca995f890108d8d /db-update
parent2b7bb0c6b7aa4f7a43c82db1cf9a18d27600c62e (diff)
downloaddbscripts-5c7220a4aa370d1f726eb27d99d8f9294646433d.tar.gz
dbscripts-5c7220a4aa370d1f726eb27d99d8f9294646433d.tar.xz
Avoid calls to basename
Diffstat (limited to 'db-update')
-rwxr-xr-xdb-update14
1 files changed, 7 insertions, 7 deletions
diff --git a/db-update b/db-update
index 60af79f..a9d307f 100755
--- a/db-update
+++ b/db-update
@@ -4,7 +4,7 @@
. "$(dirname $0)/config"
if [ $# -ge 1 ]; then
- warning "Calling $(basename $0) with a specific repository is no longer supported"
+ warning "Calling ${0##*/} with a specific repository is no longer supported"
exit 1
fi
@@ -30,19 +30,19 @@ for repo in ${repos[@]}; do
if [ $? -eq 0 ]; then
for pkg in ${pkgs[@]}; do
if [ -h "${pkg}" ]; then
- die "Package ${repo}/$(basename ${pkg}) is a symbolic link"
+ die "Package ${repo}/${pkg##*/} is a symbolic link"
fi
if ! check_pkgfile "${pkg}"; then
- die "Package ${repo}/$(basename ${pkg}) is not consistent with its meta data"
+ die "Package ${repo}/${pkg##*/} is not consistent with its meta data"
fi
if ${REQUIRE_SIGNATURE} && ! check_pkgsig "${pkg}.sig"; then
- die "Package ${repo}/$(basename ${pkg}) does not have a valid signature"
+ die "Package ${repo}/${pkg##*/} does not have a valid signature"
fi
if ! check_pkgsvn "${pkg}" "${repo}"; then
- die "Package ${repo}/$(basename ${pkg}) is not consistent with svn repository"
+ die "Package ${repo}/${pkg##*/} is not consistent with svn repository"
fi
if ! check_pkgrepos "${pkg}"; then
- die "Package ${repo}/$(basename ${pkg}) already exists in another repository"
+ die "Package ${repo}/${pkg##*/} already exists in another repository"
fi
done
if ! check_splitpkgs ${repo} ${pkgs[@]}; then
@@ -60,7 +60,7 @@ for repo in ${repos[@]}; do
add_pkgs=()
arch_pkgs=($(getpkgfiles "${STAGING}/${repo}/"*-${pkgarch}${PKGEXT} 2>/dev/null))
for pkg in ${arch_pkgs[@]} ${any_pkgs[@]}; do
- pkgfile="$(basename ${pkg})"
+ pkgfile="${pkg##*/}"
msg2 "${pkgfile} (${pkgarch})"
# any packages might have been moved by the previous run
if [ -f "${pkg}" ]; then