Use find instead ls for dir:// repository to allow subdirectory.

This commit is contained in:
Matteo Rossini 2016-03-03 22:14:45 +01:00
parent 1bc0e22ae8
commit f85b2ca2a8

View file

@ -1423,7 +1423,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
continue continue
fi fi
( cd $localpath ( cd $localpath
ls -ld *.t[blxg]z 2>/dev/null|sort -rn|grep ^-|awk '{print "./SLACKPKGPLUS_'$PREPO'/"$NF}'|awk -f /usr/libexec/slackpkg/pkglist.awk >> ${TMPDIR}/pkglist-pre find . -type f -name '*.t[blxg]z'|sed "s,^./,./SLACKPKGPLUS_$PREPO/,"|awk -f /usr/libexec/slackpkg/pkglist.awk|sort -k6 -rn >> ${TMPDIR}/pkglist-pre
) )
fi fi
done done
@ -1490,7 +1490,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
localpath=$(pwd)/$localpath localpath=$(pwd)/$localpath
fi fi
( cd $localpath ( cd $localpath
ls -ld *.t[blxg]z 2>/dev/null|sort -rn|grep ^-|awk '{print "./SLACKPKGPLUS_'$repository'/"$NF}'|awk -f /usr/libexec/slackpkg/pkglist.awk >> ${TMPDIR}/pkglist-pre find . -type f -name '*.t[blxg]z'|sed "s,^./,./SLACKPKGPLUS_$PREPO/,"|awk -f /usr/libexec/slackpkg/pkglist.awk|sort -k6 -rn >> ${TMPDIR}/pkglist-pre
) )
MIRRORPLUS[$repository]="file:/$localpath/" MIRRORPLUS[$repository]="file:/$localpath/"
PRIORITYLIST=( ${PRIORITYLIST[*]} SLACKPKGPLUS_${repository}:.* ) PRIORITYLIST=( ${PRIORITYLIST[*]} SLACKPKGPLUS_${repository}:.* )