Fixed a bug in wrt_remove_existing_dirs when both bz2 and gz version of the same package are found in sources dir.

This commit is contained in:
Manuel Canales Esparcia 2006-06-01 19:52:44 +00:00
parent 190d3a267c
commit 3b3251a955

View file

@ -214,7 +214,8 @@ wrt_remove_existing_dirs() { #
local PKG_NAME=$1
(
cat << EOF
@ROOT=\`tar -tf \$(MOUNT_PT)\$(SRC)/${PKG_NAME} | head -n1 | sed -e 's@^./@@;s@/.*@@'\` && \\
@PKG_PATH=\`ls -t \$(MOUNT_PT)\$(SRC)/${PKG_NAME} | head -n1\` && \\
ROOT=\`tar -tf \$\$PKG_PATH | head -n1 | sed -e 's@^./@@;s@/.*@@'\` && \\
[[ -n \$\$ROOT ]] && \\
rm -rf \$(MOUNT_PT)\$(SRC)/\$\$ROOT && \\
if [ -e \$(MOUNT_PT)\$(SRC)/${PKG_NAME%%-*}-build ]; then \\
@ -230,7 +231,8 @@ wrt_remove_existing_dirs2() { #
local PKG_NAME=$1
(
cat << EOF
@ROOT=\`tar -tf \$(SRC)/${PKG_NAME} | head -n1 | sed -e 's@^./@@;s@/.*@@'\` && \\
@PKG_PATH=\`ls -t \$(SRC)/${PKG_NAME} | head -n1\` && \\
ROOT=\`tar -tf \$\$PKG_PATH | head -n1 | sed -e 's@^./@@;s@/.*@@'\` && \\
[[ -n \$\$ROOT ]] && \\
rm -rf \$(SRC)/\$\$ROOT && \\
if [ -e \$(SRC)/${PKG_NAME%%-*}-build ]; then \\