From c7b2624f2e69c37c9299c8942f79db89e735b892 Mon Sep 17 00:00:00 2001 From: Victor Lowther Date: Fri, 6 Mar 2009 13:58:56 -0600 Subject: [PATCH] Simplify inst_script a bit We do not need separate source and target parameters, so do not use them. --- dracut-functions | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dracut-functions b/dracut-functions index 2556db37..bd4946a3 100755 --- a/dracut-functions +++ b/dracut-functions @@ -107,10 +107,10 @@ inst_binary() { # If your shell script does not start with shebang, it is not a shell script. inst_script() { [[ -f $1 ]] || return 1 - local src=$1 target=${2:-$1} line - read -r -n 80 line <"$src" + local line + read -r -n 80 line <"$1" [[ $line =~ (#! *)(/[^ ]+).* ]] || return 1 - inst "${BASH_REMATCH[2]}" && inst_simple "$src" "$target" + inst "${BASH_REMATCH[2]}" && inst_simple "$@" } # same as above, but specialized for symlinks