ppp-sync/ubuntu.sh

52 lines
2.6 KiB
Bash
Raw Normal View History

2023-09-03 22:00:17 +02:00
#! /bin/bash
set -e
# Give correct perms to Apt version checker
chmod 755 ./ppp
2023-09-18 16:19:39 +02:00
# output folders
mkdir -p ./manticoutput
cd ./manticoutput
2023-09-29 11:25:12 +02:00
apt install dpkg-sig wget rsync ssh -y
2023-09-18 16:19:39 +02:00
# Get ubuntu main pool
echo "Getting ubuntu main pool 32bit"
2023-09-29 11:25:12 +02:00
../ppp https://ppa.pika-os.com/dists/pikauwu/ubuntu/binary-i386/Packages.gz http://archive.ubuntu.com/ubuntu/dists/mantic/main/binary-i386/Packages.xz http://archive.ubuntu.com/ubuntu/ ./
2023-09-18 16:19:39 +02:00
echo "Getting ubuntu main pool 64bit"
2023-09-29 11:25:12 +02:00
../ppp https://ppa.pika-os.com/dists/pikauwu/ubuntu/binary-amd64/Packages.gz http://archive.ubuntu.com/ubuntu/dists/mantic/main/binary-amd64/Packages.xz http://archive.ubuntu.com/ubuntu/ ./
2023-09-18 16:19:39 +02:00
# Get ubuntu multiverse pool
echo "Getting ubuntu multiverse pool 32bit"
2023-09-29 11:25:12 +02:00
../ppp https://ppa.pika-os.com/dists/pikauwu/ubuntu/binary-i386/Packages.gz http://archive.ubuntu.com/ubuntu/dists/mantic/multiverse/binary-i386/Packages.xz http://archive.ubuntu.com/ubuntu/ ./
2023-09-18 16:19:39 +02:00
echo "Getting ubuntu multiverse pool 64bit"
2023-09-29 11:25:12 +02:00
../ppp https://ppa.pika-os.com/dists/pikauwu/ubuntu/binary-amd64/Packages.gz http://archive.ubuntu.com/ubuntu/dists/mantic/multiverse/binary-amd64/Packages.xz http://archive.ubuntu.com/ubuntu/ ./
2023-09-18 16:19:39 +02:00
# Get ubuntu restricted pool
echo "Getting ubuntu restricted pool 32bit"
2023-09-29 11:25:12 +02:00
../ppp https://ppa.pika-os.com/dists/pikauwu/ubuntu/binary-i386/Packages.gz http://archive.ubuntu.com/ubuntu/dists/mantic/restricted/binary-i386/Packages.xz http://archive.ubuntu.com/ubuntu/ ./
2023-09-18 16:19:39 +02:00
echo "Getting ubuntu restricted pool 64bit"
2023-09-29 11:25:12 +02:00
../ppp https://ppa.pika-os.com/dists/pikauwu/ubuntu/binary-amd64/Packages.gz http://archive.ubuntu.com/ubuntu/dists/mantic/restricted/binary-amd64/Packages.xz http://archive.ubuntu.com/ubuntu/ ./
2023-09-18 16:19:39 +02:00
# Get ubuntu universe pool
echo "Getting ubuntu universe pool 32bit"
2023-09-29 11:25:12 +02:00
../ppp https://ppa.pika-os.com/dists/pikauwu/ubuntu/binary-i386/Packages.gz http://archive.ubuntu.com/ubuntu/dists/mantic/universe/binary-i386/Packages.xz http://archive.ubuntu.com/ubuntu/ ./
2023-09-18 16:19:39 +02:00
echo "Getting ubuntu universe pool 64bit"
2023-09-29 11:25:12 +02:00
../ppp https://ppa.pika-os.com/dists/pikauwu/ubuntu/binary-amd64/Packages.gz http://archive.ubuntu.com/ubuntu/dists/mantic/universe/binary-amd64/Packages.xz http://archive.ubuntu.com/ubuntu/ ./
2023-09-18 16:19:39 +02:00
cd ../
if [ $(ls ./manticoutput/ | wc -l) -lt 1 ]; then
2023-09-18 17:06:28 +02:00
echo "Mantic repos are synced"
2023-09-18 16:19:39 +02:00
exit 0
fi
# send debs to server
rsync -azP ./manticoutput/ ferreo@direct.pika-os.com:/srv/www/incoming/
# add debs to repo
2023-09-29 11:25:12 +02:00
ssh ferreo@direct.pika-os.com 'aptly repo add -force-replace -remove-files pikauwu-ubuntu /srv/www/incoming/'
2023-09-18 16:19:39 +02:00
# publish the repo
2023-09-29 11:25:12 +02:00
ssh ferreo@direct.pika-os.com 'aptly publish update -batch -skip-contents -force-overwrite pikauwu filesystem:pikarepo:'