Modify script to find sign-file

i9
Arkady L. Shane 1 year ago
parent a0a855b8bd
commit 99c04afbce
Signed by: tigro
GPG Key ID: 9C7900103E1C4F8B

@ -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.

Loading…
Cancel
Save