2023-09-03 22:00:17 +02:00
|
|
|
#! /bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# Give correct perms to Apt version checker
|
|
|
|
chmod 755 ./ppp
|
|
|
|
|
2023-09-04 23:50:34 +02:00
|
|
|
# output folders
|
|
|
|
mkdir -p ./output/output
|
2023-09-05 01:05:35 +02:00
|
|
|
cd ./output/output
|
2023-09-03 22:00:17 +02:00
|
|
|
|
|
|
|
# temp
|
|
|
|
apt update
|
|
|
|
apt upgrade -y
|
|
|
|
# end of temp
|
|
|
|
|
2023-09-05 12:18:17 +02:00
|
|
|
apt install dpkg-sig wget rsync ssh -y
|
2023-09-03 22:12:24 +02:00
|
|
|
|
2023-09-03 22:00:17 +02:00
|
|
|
# Get ubuntu main pool
|
2023-09-05 12:46:00 +02:00
|
|
|
../../ppp https://ppa.pika-os.com/dists/lunar/ubuntu/binary-i386/Packages.gz http://archive.ubuntu.com/ubuntu/dists/lunar/main/binary-i386/Packages.xz http://archive.ubuntu.com/ubuntu/ ./
|
2023-09-05 01:05:35 +02:00
|
|
|
rm -rfv ./*all.deb
|
2023-09-05 12:46:00 +02:00
|
|
|
../../ppp https://ppa.pika-os.com/dists/lunar/ubuntu/binary-amd64/Packages.gz http://archive.ubuntu.com/ubuntu/dists/lunar/main/binary-amd64/Packages.xz http://archive.ubuntu.com/ubuntu/ ./
|
2023-09-03 22:00:17 +02:00
|
|
|
|
2023-09-05 12:02:27 +02:00
|
|
|
# # Get ubuntu multiverse pool
|
2023-09-05 12:46:00 +02:00
|
|
|
# ../../ppp https://ppa.pika-os.com/dists/lunar/ubuntu/binary-i386/Packages.gz http://archive.ubuntu.com/ubuntu/dists/lunar/multiverse/binary-i386/Packages.xz http://archive.ubuntu.com/ubuntu/ ./
|
2023-09-05 12:02:27 +02:00
|
|
|
# rm -rfv ./*all.deb
|
2023-09-05 12:46:00 +02:00
|
|
|
# ../../ppp https://ppa.pika-os.com/dists/lunar/ubuntu/binary-amd64/Packages.gz http://archive.ubuntu.com/ubuntu/dists/lunar/multiverse/binary-amd64/Packages.xz http://archive.ubuntu.com/ubuntu/ ./
|
2023-09-05 12:02:27 +02:00
|
|
|
|
|
|
|
# # Get ubuntu restricted pool
|
2023-09-05 12:46:00 +02:00
|
|
|
# ../../ppp https://ppa.pika-os.com/dists/lunar/ubuntu/binary-i386/Packages.gz http://archive.ubuntu.com/ubuntu/dists/lunar/restricted/binary-i386/Packages.xz http://archive.ubuntu.com/ubuntu/ ./
|
2023-09-05 12:02:27 +02:00
|
|
|
# rm -rfv ./*all.deb
|
2023-09-05 12:46:00 +02:00
|
|
|
# ../../ppp https://ppa.pika-os.com/dists/lunar/ubuntu/binary-amd64/Packages.gz http://archive.ubuntu.com/ubuntu/dists/lunar/restricted/binary-amd64/Packages.xz http://archive.ubuntu.com/ubuntu/ ./
|
2023-09-05 12:02:27 +02:00
|
|
|
|
|
|
|
# # Get ubuntu universe pool
|
2023-09-05 12:46:00 +02:00
|
|
|
# ../../ppp https://ppa.pika-os.com/dists/lunar/ubuntu/binary-i386/Packages.gz http://archive.ubuntu.com/ubuntu/dists/lunar/universe/binary-i386/Packages.xz http://archive.ubuntu.com/ubuntu/ ./
|
2023-09-05 12:02:27 +02:00
|
|
|
# rm -rfv ./*all.deb
|
2023-09-05 12:46:00 +02:00
|
|
|
# ../../ppp https://ppa.pika-os.com/dists/lunar/ubuntu/binary-amd64/Packages.gz http://archive.ubuntu.com/ubuntu/dists/lunar/universe/binary-amd64/Packages.xz http://archive.ubuntu.com/ubuntu/ ./
|
2023-09-03 22:00:17 +02:00
|
|
|
|
2023-09-05 01:05:35 +02:00
|
|
|
cd ../
|
|
|
|
|
2023-09-05 12:56:57 +02:00
|
|
|
if [ ! -e ./output/*.deb ]; then
|
|
|
|
echo "Repos are synced"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2023-09-03 22:00:17 +02:00
|
|
|
# Sign the packages
|
2023-09-05 02:33:45 +02:00
|
|
|
../ppp sign ./output/
|
2023-09-03 22:00:17 +02:00
|
|
|
|
|
|
|
# Pull down existing ppa repo db files etc
|
|
|
|
rsync -azP --exclude '*.deb' ferreo@direct.pika-os.com:/srv/www/pikappa/ ./output/repo
|
|
|
|
|
|
|
|
# Check if the ubuntu component exists
|
|
|
|
if cat ./output/repo/conf/distributions | grep Components: | grep ubuntu
|
|
|
|
then
|
|
|
|
true
|
|
|
|
else
|
|
|
|
sed -i "s#Components:#Components: ubuntu#" ./output/repo/conf/distributions
|
|
|
|
fi
|
|
|
|
|
|
|
|
apt remove reprepro -y
|
|
|
|
wget -nv https://launchpad.net/ubuntu/+archive/primary/+files/reprepro_5.3.0-1.4_amd64.deb
|
|
|
|
apt install -y ./reprepro_5.3.0-1.4_amd64.deb
|
|
|
|
|
2023-09-05 12:31:16 +02:00
|
|
|
# Add the new packages to the repo
|
|
|
|
reprepro -C ubuntu -V --basedir ./output/repo/ includedeb lunar ./output/*.deb
|
2023-09-03 22:00:17 +02:00
|
|
|
|
|
|
|
# Push the updated ppa repo to the server
|
|
|
|
rsync -azP ./output/repo/ ferreo@direct.pika-os.com:/srv/www/pikappa/
|