ppp-sync/oneapi.sh

58 lines
2.2 KiB
Bash
Raw Normal View History

2023-10-27 10:28:48 +02:00
#! /bin/bash
set -e
2023-10-27 12:24:56 +02:00
ssh ferreo@direct.pika-os.com 'aptly repo remove pikauwu-rocm intel-media-va-driver-non-free'
ssh ferreo@direct.pika-os.com 'aptly repo remove pikauwu-rocm libva-drm2'
ssh ferreo@direct.pika-os.com 'aptly repo remove pikauwu-rocm libva-glx2'
ssh ferreo@direct.pika-os.com 'aptly repo remove pikauwu-rocm libva-wayland2'
ssh ferreo@direct.pika-os.com 'aptly repo remove pikauwu-rocm libva-x11-2'
ssh ferreo@direct.pika-os.com 'aptly repo remove pikauwu-rocm libva2'
2023-10-27 10:42:55 +02:00
# Give correct perms to Apt version checker
chmod 755 ./ppp
# Get oneAPI pool
2023-10-27 12:50:37 +02:00
mkdir -p ./manticoutput-tmp
cd ./manticoutput-tmp
2023-10-27 10:42:55 +02:00
2023-10-27 13:05:47 +02:00
../ppp https://ppa.pika-os.com/dists/pikauwu/lobo/binary-amd64/Packages https://repositories.intel.com/gpu/ubuntu/dists/jammy/unified/binary-amd64/Packages https://repositories.intel.com/gpu/ubuntu/ ./
2023-10-27 10:42:55 +02:00
2023-10-27 12:58:52 +02:00
rm -rfv ./intel-i915-dkms_*.deb
rm -rfv ./libdrm*.deb
2023-10-27 13:03:11 +02:00
rm -rfv ./*va*.deb
rm -rfv ./intel-gsc*.deb
rm -rfv ./libmetee*.deb
wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy unified" | tee /etc/apt/sources.list.d/intel-gpu-jammy.list
apt update
apt download -y intel-gsc intel-gsc-dev libmetee-dev libmetee
2023-10-27 12:58:52 +02:00
2023-10-27 12:50:37 +02:00
if [ $(ls ./ | wc -l) -lt 1 ]; then
2023-10-27 10:42:55 +02:00
echo "Mantic repos are synced"
exit 0
fi
2023-10-27 12:44:44 +02:00
for i in ./*.deb
do
mkdir $i-tmp
dpkg-deb -R $i $i-tmp
cat $i-tmp/DEBIAN/control | grep Version: | head -n1 | cut -d":" -f2- | tr -d ' ' > $i-version
2023-10-27 13:05:47 +02:00
sed -i "s#$(cat $i-version)#$(cat $i-version)-pika$(date +"%Y%m%d").pikauwu2#g" $i-tmp/DEBIAN/control
2023-10-27 12:44:44 +02:00
sed -e s"#(=#(>=#"g -i $i-tmp/DEBIAN/control
2023-10-27 13:05:47 +02:00
dpkg-deb -b $i-tmp $i-"$(date +"%Y%m%d")"-pika-pikauwu2-fixed.deb
2023-10-27 12:44:44 +02:00
done
2023-10-27 12:50:37 +02:00
2023-10-27 12:44:44 +02:00
cd ../
2023-10-27 12:50:37 +02:00
mkdir -p ./manticoutput/
mv -v ./manticoutput-tmp/*-fixed.deb ./manticoutput/
2023-10-27 10:42:55 +02:00
# send debs to server
2023-10-27 12:50:37 +02:00
rsync -azP ./manticoutput/ ferreo@direct.pika-os.com:/srv/www/incoming/
2023-10-27 10:42:55 +02:00
2023-10-27 10:28:48 +02:00
# add debs to repo
2023-10-27 11:35:28 +02:00
ssh ferreo@direct.pika-os.com 'aptly repo add -force-replace -remove-files pikauwu-rocm /srv/www/incoming/'
2023-10-27 10:28:48 +02:00
# publish the repo
2023-10-27 11:35:28 +02:00
ssh ferreo@direct.pika-os.com 'aptly publish update -batch -skip-contents -force-overwrite pikauwu filesystem:pikarepo:'