ppp-sync/ubuntu.sh

57 lines
2.7 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-04 23:50:34 +02:00
# output folders
2023-09-06 19:17:54 +02:00
mkdir -p ./output/incoming
2023-09-03 22:00:17 +02:00
2023-09-06 19:21:11 +02:00
cd ./output
2023-09-03 22:00:17 +02:00
# temp
apt update
apt upgrade -y
# end of temp
2023-09-06 19:17:54 +02:00
apt install 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 13:45:07 +02:00
echo "Getting ubuntu main pool 32bit"
2023-09-06 19:19:38 +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/ ./incoming
2023-09-05 13:45:07 +02:00
echo "Getting ubuntu main pool 64bit"
2023-09-06 19:19:38 +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/ ./incoming
2023-09-03 22:00:17 +02:00
2023-09-05 14:49:39 +02:00
# Get ubuntu multiverse pool
2023-09-06 19:17:54 +02:00
# echo "Getting ubuntu multiverse pool 32bit"
2023-09-06 19:19:38 +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/ ./incoming
2023-09-06 19:17:54 +02:00
# echo "Getting ubuntu multiverse pool 64bit"
2023-09-06 19:19:38 +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/ ./incoming
2023-09-05 12:02:27 +02:00
2023-09-05 14:49:39 +02:00
# Get ubuntu restricted pool
2023-09-06 19:17:54 +02:00
# echo "Getting ubuntu restricted pool 32bit"
2023-09-06 19:19:38 +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/ ./incoming
2023-09-06 19:17:54 +02:00
# echo "Getting ubuntu restricted pool 64bit"
2023-09-06 19:19:38 +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/ ./incoming
2023-09-05 12:02:27 +02:00
2023-09-05 15:01:16 +02:00
# Get ubuntu universe pool
2023-09-06 19:17:54 +02:00
# echo "Getting ubuntu universe pool 32bit"
2023-09-06 19:19:38 +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/ ./incoming
2023-09-06 19:17:54 +02:00
# echo "Getting ubuntu universe pool 64bit"
2023-09-06 19:19:38 +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/ ./incoming
2023-09-05 01:05:35 +02:00
2023-09-06 19:26:20 +02:00
if [ $(ls ./incoming/ | wc -l) -lt 1 ]; then
2023-09-05 12:56:57 +02:00
echo "Repos are synced"
exit 0
fi
2023-09-06 19:17:54 +02:00
# send debs to server
2023-09-06 19:26:20 +02:00
rsync -azP ./incoming/ ferreo@direct.pika-os.com:/srv/www/incoming/
2023-09-06 15:05:12 +02:00
2023-09-06 19:17:54 +02:00
# add debs to repo
ssh ferreo@direct.pika-os.com 'aptly repo add -force-replace -remove-files pika-ubuntu /srv/www/incoming'
2023-09-03 22:00:17 +02:00
2023-09-06 19:17:54 +02:00
# publish the repo
ssh ferreo@direct.pika-os.com 'aptly publish repo -batch -skip-contents -force-overwrite -component=,,,, pika-a
mdgpu pika-external pika-main pika-rocm pika-ubuntu filesystem:pikarepo:'