summaryrefslogtreecommitdiffstats
path: root/bin/psign.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/psign.sh')
-rwxr-xr-xbin/psign.sh108
1 files changed, 108 insertions, 0 deletions
diff --git a/bin/psign.sh b/bin/psign.sh
new file mode 100755
index 0000000..7762087
--- /dev/null
+++ b/bin/psign.sh
@@ -0,0 +1,108 @@
+#!/bin/sh
+
+set -e
+
+case "$(basename ${0})" in
+ p*)
+ MODE="progress-linux"
+ ;;
+
+ b*)
+ MODE="bfh"
+ ;;
+esac
+
+for CHANGES in *.changes
+do
+ if [ ! -e "${CHANGES}" ]
+ then
+ continue
+ fi
+
+ DISTRIBUTION="$(grep -s -m1 '^Distribution: ' ${CHANGES} | awk '{ print $2 }')"
+
+ case "${MODE}" in
+ progress-linux)
+ case "${DISTRIBUTION}" in
+ engywuck*)
+ DESCRIPTION="Progress Linux 5 (engywuck) Archive Key"
+ KEY="0x03CED5154316222A"
+ ;;
+
+ fuchur*)
+ DESCRIPTION="Progress Linux 6 (fuchur) Archive Key"
+ KEY="0x753373FBB95C4EA6"
+ ;;
+
+ graograman*)
+ DESCRIPTION="Progress Linux 7 (graograman) Archive Key"
+ KEY=""
+ ;;
+
+ *)
+ # Debian
+ DESCRIPTION="Daniel Baumann (2014) Key"
+ KEY="55CF1BF986ABB9C7"
+ ;;
+ esac
+ ;;
+
+ bfh)
+ DESCRIPTION="BFH (2018) Key"
+ KEY="0xBFEEA48634831878"
+ ;;
+ esac
+
+ echo "Signing ${CHANGES} with: ${DESCRIPTION}"
+ debsign -k${KEY} --re-sign ${CHANGES}
+done
+
+for DSC in *.dsc
+do
+ if [ ! -e "${DSC}" ]
+ then
+ continue
+ fi
+
+ #DISTRIBUTION="$(grep -s -m1 '^Distribution: ' $(echo $PWD | sed -e 's|_source|_all|')/*.changes | awk '{ print $2 }')"
+ #DISTRIBUTION="${DISTRIBUTION:-$(grep -s -m1 '^Distribution: ' $(echo $PWD | sed -e 's|_source|_amd64|')/*.changes | awk '{ print $2 }')}"
+ #DISTRIBUTION="${DISTRIBUTION:-$(grep -s -m1 '^Distribution: ' $(echo $PWD | sed -e 's|_source|_i386|')/*.changes | awk '{ print $2 }')}"
+ #DISTRIBUTION="$(echo ${DISTRIBUTION} | awk '{ print $1 }')"
+
+ DISTRIBUTION="$(awk '/^Vcs-Git:/ { print $2 }' *dsc | awk -F/ '{ print $5 }')"
+
+ case "${MODE}" in
+ progress-linux)
+ case "${DISTRIBUTION}" in
+ engywuck*)
+ DESCRIPTION="Progress Linux 5 (engywuck) Archive Key"
+ KEY="0x03CED5154316222A"
+ ;;
+
+ fuchur*)
+ DESCRIPTION="Progress Linux 6 (fuchur) Archive Key"
+ KEY="0x753373FBB95C4EA6"
+ ;;
+
+ graograman*)
+ DESCRIPTION="Progress Linux 7 (graograman) Archive Key"
+ KEY=""
+ ;;
+
+ *)
+ # Debian
+ DESCRIPTION="Daniel Baumann (2014) Key"
+ KEY="55CF1BF986ABB9C7"
+ ;;
+ esac
+ ;;
+
+ bfh)
+ DESCRIPTION="BFH (2018) Key"
+ KEY="0xBFEEA48634831878"
+ ;;
+ esac
+
+ echo "Signing ${DSC} with: ${DESCRIPTION}"
+ debsign -k${KEY} --re-sign ${DSC}
+done