2022-08-09 18:50:36 -04:00
|
|
|
#!/bin/bash
|
2024-04-22 07:48:54 -04:00
|
|
|
#Copyright (c) 2022-2023 Divested Computing Group
|
2022-08-09 18:50:36 -04:00
|
|
|
#
|
|
|
|
#This program is free software: you can redistribute it and/or modify
|
|
|
|
#it under the terms of the GNU General Public License as published by
|
|
|
|
#the Free Software Foundation, either version 3 of the License, or
|
|
|
|
#(at your option) any later version.
|
|
|
|
#
|
|
|
|
#This program is distributed in the hope that it will be useful,
|
|
|
|
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
#GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
#You should have received a copy of the GNU General Public License
|
|
|
|
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
#source build/envsetup.sh && breakfast lineage_clark-user && make -j20 otatools;
|
2022-08-15 16:37:41 -04:00
|
|
|
umask 0022;
|
|
|
|
set -uo pipefail;
|
2022-08-09 18:50:36 -04:00
|
|
|
|
2023-05-12 21:43:02 -04:00
|
|
|
export copyPartsZip="/mnt/backup-1/DivestOS/Builds/Extras/copy-partitions-20210323_1922-cleaned.zip"; #XXX: ADJUST ME
|
2023-03-08 00:22:01 -05:00
|
|
|
|
2023-05-12 21:43:02 -04:00
|
|
|
export repoDir="/mnt/backup-1/DivestOS/Builds/Supporting_Files/";
|
2022-08-09 18:50:36 -04:00
|
|
|
mkdir -p $repoDir;
|
|
|
|
|
2023-05-08 22:28:11 -04:00
|
|
|
devicesCopy=(akari akatsuki alioth Amber aura aurora avicii barbet bluejay blueline bonito bramble cheetah cheryl coral crosshatch davinci discovery enchilada fajita flame FP3 FP4 guacamole guacamoleb hotdog hotdogb instantnoodle instantnoodlep kebab kirin lemonade lemonadep lemonades marlin mata mermaid oriole panther pioneer pro1 pro1x raven redfin sailfish sargo sunfish taimen voyager walleye xz2c);
|
2022-08-09 18:50:36 -04:00
|
|
|
|
|
|
|
for device in "${devicesCopy[@]}"
|
|
|
|
do
|
2023-03-08 00:22:01 -05:00
|
|
|
if [ -d "$DOS_SIGNING_KEYS/$device/" ]; then
|
2022-08-09 18:50:36 -04:00
|
|
|
mkdir -p "$repoDir/$device";
|
2023-03-08 00:22:01 -05:00
|
|
|
./build/tools/releasetools/sign_zip.py -k "$DOS_SIGNING_KEYS/$device/releasekey" "$copyPartsZip" "$repoDir/$device/copy-partitions-$device-release.zip";
|
|
|
|
./build/tools/releasetools/sign_zip.py -k "$DOS_SIGNING_KEYS/$device/extra" "$copyPartsZip" "$repoDir/$device/copy-partitions-$device-extra.zip";
|
2023-04-17 21:58:30 -04:00
|
|
|
gpg --homedir "$DOS_SIGNING_GPG" --sign --local-user "$DOS_GPG_SIGNING_KEY" --detach-sign --armor "$repoDir/$device/copy-partitions-$device-release.zip";
|
|
|
|
gpg --homedir "$DOS_SIGNING_GPG" --sign --local-user "$DOS_GPG_SIGNING_KEY" --detach-sign --armor "$repoDir/$device/copy-partitions-$device-extra.zip";
|
2022-08-09 18:50:36 -04:00
|
|
|
fi;
|
|
|
|
done;
|
|
|
|
|
2023-05-10 14:22:05 -04:00
|
|
|
devicesAVB=(akari akatsuki alioth Amber apollon aura aurora avicii barbet beryllium bluejay blueline bonito bramble cheetah coral crosshatch davinci dipper enchilada equuleus fajita flame FP3 FP4 guacamole guacamoleb hotdog hotdogb instantnoodle instantnoodlep jasmine_sprout kebab lavender lemonade lemonadep lemonades lmi oriole panther platina polaris pro1 pro1x raphael raven redfin sargo sunfish taimen twolip ursa vayu walleye wayne whyred xz2c);
|
2022-08-09 18:50:36 -04:00
|
|
|
|
|
|
|
for device in "${devicesAVB[@]}"
|
|
|
|
do
|
2023-03-08 00:22:01 -05:00
|
|
|
if [ -d "$DOS_SIGNING_KEYS/$device/" ]; then
|
2022-08-09 18:50:36 -04:00
|
|
|
mkdir -p "$repoDir/$device";
|
2023-03-08 00:22:01 -05:00
|
|
|
cp "$DOS_SIGNING_KEYS/$device/avb_pkmd.bin" "$repoDir/$device/avb_pkmd-$device.bin";
|
2023-04-17 21:58:30 -04:00
|
|
|
gpg --homedir "$DOS_SIGNING_GPG" --sign --local-user "$DOS_GPG_SIGNING_KEY" --detach-sign --armor "$repoDir/$device/avb_pkmd-$device.bin";
|
2022-08-09 18:50:36 -04:00
|
|
|
fi;
|
|
|
|
done;
|