Files
Rolf Leggewie 63986242b6 pad double digits in kernel patch names with a leading zero (#8520)
Affected kernels:
- odroidxu4-6.6
- spacemit-6.6

the following script gets it mostly (!) right

for patch in patch-6.6.*; do
    # Extract the numbers using parameter expansion
    num1=${patch:10:2}  # Get the first number (2 digits)
    num2=${patch:13:2}  # Get the second number (2 digits)

    # Pad the numbers with leading zeros
    padded_num1=$(printf "%03d" "$num1")
    padded_num2=$(printf "%03d" "$num2")

    # Construct the new patch name
    new_patch="patch-6.6.${padded_num1}-${padded_num2}.patch"

    # Rename the file using git mv
    git mv -v "$patch" "$new_patch"
done
2025-08-19 14:10:26 +02:00
..