summaryrefslogtreecommitdiff
path: root/sign.sh
blob: 458b0cfc0dc14b69e3c8d662d8ce84f3b9cb4863 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -e
shopt -s extglob nullglob

PKG_BASE=$(dirname "$(realpath "$0")")
cd "${PKG_BASE}"
PKG_RVSN=1

PKG_REPO="${PKG_BASE}/apt/"

cd "${PKG_REPO}/dists/ios/"

for PKG_CFTARG in */ */*/binary*/; do
    pushd ${PKG_CFTARG}
        {
        cat <<EOF
Origin: Bingner/Elucubratus
Label: Bingner/Elucubratus
Suite: stable
Version: 1.0r${PKG_RVSN}
Codename: ios
Architectures: iphoneos-arm
Components: main
Description: Distribution of Unix Software for iPhoneOS
Support: https://cydia.saurik.com/api/support/*
MD5Sum:
EOF

        find * -type f | grep -v Release | while read -r line; do
            echo " $(md5sum "${line}" | cut -d ' ' -f 1) $(stat -f %z "${line}" | cut -d $'\t' -f 1) ${line}"
        done

        } >"Release"

        rm -f Release.gpg
        gpg -abs -o Release.gpg Release
    popd
done