lists/start.sh

38 lines
778 B
Bash
Raw Normal View History

2025-02-04 12:48:13 +00:00
#!/bin/sh
rm SCP_FILES
rm -rf ./pkgs
find ./ -type f -print | grep \\.decl | sort > tmplist1
cat tmplist1
TOTAL_PKGS=$(wc -l tmplist1)
COUNTER=0
cat tmplist1 | while read DECL
do
COUNTER=$((COUNTER+1))
./decl-to-pkg.sh "$DECL"
echo "($COUNTER/$TOTAL_PKGS) $DECL"
done
find ./pkgs/ -type f -print | grep \\.txt | sort > pkglists
cat pkglists | while read PKGLIST
do
OUTPUT="$(basename "$PKGLIST")"
echo "version 2" > tmplist0
cat "$PKGLIST" >> tmplist0
AUTH=eukara
sig=$(fteqw -privkey ~/Library/Auth/eukara.priv -pubkey ~/Library/Auth/eukara.pub -certhost $AUTH -sign2 tmplist0)
head -n 1 tmplist0 > "$OUTPUT"
echo "signature \"$AUTH\" \"$sig\"" >> "$OUTPUT"
tail -n +2 tmplist0 >> "$OUTPUT"
rm tmplist0
mv "$OUTPUT" "$PKGLIST"
done
rm tmplist1
rm pkglists