LogarithmPlotter/scripts/sign-deb.sh

27 lines
954 B
Bash
Raw Normal View History

2021-10-01 14:36:58 +00:00
#!/bin/bash
# This script is used to sign the LogarithmPlotter deb directly from it's DSC file.
# Adapted from https://github.com/astraw/stdeb/issues/181
2024-10-14 15:18:58 +00:00
cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/../build/runtime-pyside6/" || exit 1
2021-10-01 14:36:58 +00:00
PPA_ARCHIVE="ppa:ad5001/logarithmplotter"
2024-10-14 15:18:58 +00:00
for dist in `echo noble oracular`; do
echo "Signing $dist deb..."
# create a temporary folder
mkdir "deb_dist.$dist/tmp" -p
cd "deb_dist.$dist/tmp" || exit 1
rm -rf *
2021-10-01 14:36:58 +00:00
2024-10-14 15:18:58 +00:00
# DSC file variables
dsc_file="$(find ../ -regextype sed -regex ".*/*.dsc" | cut -c 4-)"
source_package_name="$(echo $dsc_file | cut -c -$(expr ${#dsc_file} - 4))"
2021-10-01 14:36:58 +00:00
2024-10-14 15:18:58 +00:00
# extract and sign the files
dpkg-source -x "../$dsc_file"
cd "$(find . -type d | head -n 2 | tail -n 1 | cut -c 3-)" # go to the (only) directory.
debuild -S -sa -k"mail@ad5001.eu"
2021-10-01 14:36:58 +00:00
2024-10-14 15:18:58 +00:00
# upload package to my PPA
dput $PPA_ARCHIVE "../${source_package_name}_source.changes"
done