From: Harald Hoyer Date: Fri, 22 Jun 2012 13:09:45 +0000 (+0200) Subject: dracut-functions.sh:inst_decompress() simplify function X-Git-Tag: 020~47 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b19c5d51f8cb5a388b0513dc3c35d9616ba8bcd2;p=thirdparty%2Fdracut.git dracut-functions.sh:inst_decompress() simplify function --- diff --git a/dracut-functions.sh b/dracut-functions.sh index 273d2a594..9861bb799 100755 --- a/dracut-functions.sh +++ b/dracut-functions.sh @@ -773,7 +773,7 @@ inst_libdir_file() { # Function install targets in the same paths inside overlay but decompressed # and without extensions (.gz, .bz2). inst_decompress() { - local _src _dst _realsrc _realdst _cmd + local _src _cmd for _src in $@ do @@ -782,20 +782,7 @@ inst_decompress() { *.bz2) _cmd='bzip2 -d' ;; *) return 1 ;; esac - - if [[ -L ${_src} ]] - then - _realsrc="$(readlink -f ${_src})" # symlink target with extension - _dst="${_src%.*}" # symlink without extension - _realdst="${_realsrc%.*}" # symlink target without extension - mksubdirs "${initdir}/${_src}" - # Create symlink without extension to target without extension. - ln -sfn "${_realdst}" "${initdir}/${_dst}" - fi - - # If the source is symlink we operate on its target. - [[ ${_realsrc} ]] && _src=${_realsrc} - inst ${_src} + inst_simple ${_src} # Decompress with chosen tool. We assume that tool changes name e.g. # from 'name.gz' to 'name'. ${_cmd} "${initdir}${_src}"