ppp-sync/pigeon-intel.sh
Ward from fusion-voyager-3 d139afd4da
Some checks failed
Process Steam Powered Repository (Parrot) / build (push) Successful in 53s
Process Intel Official Repository (Pigeon) / build (push) Failing after 51s
Process Radeon ROCm Repository (Raven) / build (push) Successful in 6m12s
Fix perms
2024-07-31 17:56:49 +03:00

53 lines
1.7 KiB
Bash
Executable File

#! /bin/bash
set -e
# Give correct perms to Apt version checker
chmod 755 ./ppp
# Get Intel pool
mkdir -p ./output-temp
cd ./output-temp
../ppp https://ppa.pika-os.com/dists/pika/pigeon/binary-amd64/Packages https://repositories.intel.com/gpu/ubuntu/dists/noble/unified/binary-amd64/Packages https://repositories.intel.com/gpu/ubuntu/ ./
# Delete Unwanted Packages or failure points with ppp
rm -rfv ./intel-i915-dkms_*.deb
rm -rfv ./libdrm*.deb
rm -rfv ./*va*.deb
rm -rfv ./*mesa*.deb
rm -rfv ./intel-gsc*.deb
rm -rfv ./libmetee*.deb
# Check if any updates have been downloaded
if [ $(ls ./ | wc -l) -lt 1 ]; then
echo "Repos are synced"
exit 0
fi
# Use apt to download weird packages that fail with ppp
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 noble unified" | tee /etc/apt/sources.list.d/intel-gpu-noble.list
apt update
apt download -y intel-gsc intel-gsc-dev libmetee-dev libmetee
# Patch Downloaded Packages control files
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
sed -i "s#$(cat $i-version)#$(cat $i-version)+pigeon$(date +"%Y%m%d")#g" $i-tmp/DEBIAN/control
sed -e s"#(=#(>=#"g -i $i-tmp/DEBIAN/control
dpkg-deb -b $i-tmp $i-"$(date +"%Y%m%d")"-pigeon-fixed.deb
done
cd ../
# Move patched packages to output
mkdir -p ./output/
mv -v ./output-temp/*-fixed.deb ./output/
# send debs to server
#rsync -azP --include './' --include '*.deb' --exclude '*' ./output/ ferreo@direct.pika-os.com:/srv/www/pigeon-incoming/