summaryrefslogtreecommitdiff
path: root/db-update
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-01-08 20:49:48 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-01-08 21:27:09 -0500
commitd3afe9bb766bbdfaab1474d21fd5e28f0a356039 (patch)
treefbbd414f8526b5ae053fc708cd6844dbfadd3ecb /db-update
parentaefd5a4d961e3eca3326c90ba266d04b325c1f15 (diff)
Avoid using $(basename $var) , use ${var##*/} instead
Diffstat (limited to 'db-update')
-rwxr-xr-xdb-update8
1 files changed, 4 insertions, 4 deletions
diff --git a/db-update b/db-update
index 60cc6cd..99c8be5 100755
--- a/db-update
+++ b/db-update
@@ -30,13 +30,13 @@ for repo in "${repos[@]}"; do
fi
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 ! 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
# This is fucking obnoxious
@@ -55,7 +55,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