|
|
@ -14,6 +14,7 @@ MODPUBKEY=$2
|
|
|
|
moddir=$3
|
|
|
|
moddir=$3
|
|
|
|
|
|
|
|
|
|
|
|
modules=$(find "$moddir" -type f -name '*.ko')
|
|
|
|
modules=$(find "$moddir" -type f -name '*.ko')
|
|
|
|
|
|
|
|
sign_file=$(find . -name 'sign-file')
|
|
|
|
|
|
|
|
|
|
|
|
NPROC=$(nproc)
|
|
|
|
NPROC=$(nproc)
|
|
|
|
[ -z "$NPROC" ] && NPROC=1
|
|
|
|
[ -z "$NPROC" ] && NPROC=1
|
|
|
@ -21,7 +22,7 @@ NPROC=$(nproc)
|
|
|
|
# NB: this loop runs 2000+ iterations. Try to be fast.
|
|
|
|
# NB: this loop runs 2000+ iterations. Try to be fast.
|
|
|
|
echo "$modules" | xargs -r -n16 -P $NPROC sh -c "
|
|
|
|
echo "$modules" | xargs -r -n16 -P $NPROC sh -c "
|
|
|
|
for mod; do
|
|
|
|
for mod; do
|
|
|
|
./scripts/sign-file sha256 $MODSECKEY $MODPUBKEY \$mod
|
|
|
|
$sign_file sha256 $MODSECKEY $MODPUBKEY \$mod
|
|
|
|
rm -f \$mod.sig \$mod.dig
|
|
|
|
rm -f \$mod.sig \$mod.dig
|
|
|
|
done
|
|
|
|
done
|
|
|
|
" DUMMYARG0 # xargs appends ARG1 ARG2..., which go into $mod in for loop.
|
|
|
|
" DUMMYARG0 # xargs appends ARG1 ARG2..., which go into $mod in for loop.
|
|
|
|