mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 06:08:08 +00:00
scripts/kernel_bump: Use git to obtain the list of files
Instead of looping of a directory to find directories related to kernel changes, use the git index instead. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
This commit is contained in:
parent
9e6c4392f8
commit
8ed187e471
@ -18,8 +18,10 @@ REQUIRED_COMMANDS='
|
|||||||
exit
|
exit
|
||||||
git
|
git
|
||||||
printf
|
printf
|
||||||
|
sed
|
||||||
set
|
set
|
||||||
shift
|
shift
|
||||||
|
sort
|
||||||
'
|
'
|
||||||
|
|
||||||
_msg()
|
_msg()
|
||||||
@ -115,7 +117,9 @@ bump_kernel()
|
|||||||
git switch --force-create '__openwrt_kernel_files_mover'
|
git switch --force-create '__openwrt_kernel_files_mover'
|
||||||
|
|
||||||
if [ "${config_only:-false}" != 'true' ]; then
|
if [ "${config_only:-false}" != 'true' ]; then
|
||||||
for _path in "${_target_dir}/"*; do
|
for _path in $(git ls-tree -d -r --name-only '__openwrt_kernel_files_mover' "${_target_dir}" |
|
||||||
|
sed -n "s|^\(.*-${source_version}\).*|\1|p" |
|
||||||
|
sort -u); do
|
||||||
if [ ! -e "${_path}" ] || \
|
if [ ! -e "${_path}" ] || \
|
||||||
[ "${_path}" = "${_path%%"-${source_version}"}" ]; then
|
[ "${_path}" = "${_path%%"-${source_version}"}" ]; then
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user