ppp-sync/pigeon-amdgpu.sh
2024-11-19 14:26:46 +01:00

70 lines
2.3 KiB
Bash
Executable File

#! /bin/bash
set -e
REPO_VERSION="6.2.3"
FIRMWARE_VERSION="6.8.5.60204-2070768.24.04"
# AMDGPU MIRROR
mkdir -p ./output/amdgpu
cd ./output/amdgpu
# amdgpu drm dir
mkdir -p ./libd
cd ./libd
wget --recursive --no-parent -R "*24.04*.deb" -A "*" -m http://repo.radeon.com/amdgpu/"$REPO_VERSION"/ubuntu/pool/main/libd/
# Return to AMDGPU MIRROR
cd ../
# amdgpu mesa dir (depends only)
mkdir -p ./mesa
cd ./mesa
wget --recursive --no-parent -R "*24.04*.deb" -A "*" -m http://repo.radeon.com/amdgpu/"$REPO_VERSION"/ubuntu/pool/main/m/mesa-amdgpu/
# Return to AMDGPU MIRROR
cd ../
# amdgpu wayland dir (depends only)
mkdir -p ./wayland-amdgpu
cd ./wayland-amdgpu
wget --recursive --no-parent -R "*24.04*.deb" -A "*" -m http://repo.radeon.com/amdgpu/"$REPO_VERSION"/ubuntu/pool/main/w/wayland-amdgpu/
# Return to AMDGPU MIRRO
cd ../
# amdgpu wayland protocols dir (depends only)
mkdir -p ./wayland-protocols-amdgpu
cd ./wayland-protocols-amdgpu
wget --recursive --no-parent -R "*24.04*.deb" -A "*" -m http://repo.radeon.com/amdgpu/"$REPO_VERSION"/ubuntu/pool/main/w/wayland-protocols-amdgpu/
# Return to AMDGPU MIRROR
cd ../
# amdgpu proprietary dir
mkdir -p ./proprietary
cd ./proprietary
wget --recursive --no-parent -R "*24.04*.deb" -A "*" -m https://repo.radeon.com/amdgpu/"$REPO_VERSION"/ubuntu/pool/proprietary/
# Return to AMDGPU MIRROR
cd ../
# amdgpu-dkms-firmware dir
mkdir -p ./amdgpu-dkms-firmware
cd ./amdgpu-dkms-firmware
wget https://repo.radeon.com/amdgpu/6.2.4/ubuntu/pool/main/a/amdgpu-dkms/amdgpu-dkms-firmware_"$FIRMWARE_VERSION"_all.deb
# Return to AMDGPU MIRROR
cd ../
mkdir -p ./output
mkdir -p ./output-temp
find . -name \*.deb -exec cp -vf {} ./output-temp \;
cd ./output-temp
for i in ./*.deb
do
mkdir $i-temp
dpkg-deb -R $i $i-temp
cat $i-temp/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-temp/DEBIAN/control
sed -e s"#(=#(>=#"g -i $i-temp/DEBIAN/control
dpkg-deb -b $i-temp $i+pigeon$(date +"%Y%m%d")-fixed.deb
done
cd ../
mv -v ./output-temp/*-fixed.deb ./output/
# send debs to server
rsync -azP ./output/ ferreo@direct.pika-os.com:/srv/www/incoming/
# send debs to server
rsync -azP --include './' --include '*.deb' --exclude '*' ./output/ ferreo@direct.pika-os.com:/srv/www/pigeon-incoming/