diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-05-08 06:44:42 +0200 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-05-16 23:55:54 +0200 |
commit | 79f6bb0dea639db6715ec178f3bbc85f41c4b92d (patch) | |
tree | fb0fc8fb370c3a231616d99fe2dc6b8451e71998 /functions | |
parent | da1620afa90ec64cd4fb84dd816067c19f1a1761 (diff) | |
download | mkinitcpio-79f6bb0dea639db6715ec178f3bbc85f41c4b92d.tar.gz mkinitcpio-79f6bb0dea639db6715ec178f3bbc85f41c4b92d.tar.xz |
functions: remove get_dirname and get_basename
A lot has changed since 643e98eeb42677 when these functions were
implemented, and there is exactly 1 case of get_dirname left, and no
calls to get_basename. Remove these, and use a PE in place of the
remaining call.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'functions')
-rw-r--r-- | functions | 14 |
1 files changed, 1 insertions, 13 deletions
@@ -168,18 +168,6 @@ die() { cleanup 1 } -get_basename() { - local base=${1%/} - base=${base##*/} - printf '%s' "${base:-/}" -} - -get_dirname() { - local dir=${1%/} - dir=${dir%/*} - printf '%s' "${dir:-/}" -} - in_array() { # Search for an element in an array. # $1: needle @@ -337,7 +325,7 @@ add_symlink() { (( $# == 2 )) || return 1 - add_dir "$(get_dirname "$1")" + add_dir "${1%/*}" if (( ! QUIET )); then if [[ -L $BUILDROOT$1 ]]; then |