diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-01-08 20:49:48 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-01-08 21:27:09 -0500 |
commit | d3afe9bb766bbdfaab1474d21fd5e28f0a356039 (patch) | |
tree | fbbd414f8526b5ae053fc708cd6844dbfadd3ecb /db-update | |
parent | aefd5a4d961e3eca3326c90ba266d04b325c1f15 (diff) |
Avoid using $(basename $var) , use ${var##*/} instead
Diffstat (limited to 'db-update')
-rwxr-xr-x | db-update | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |