This commit is contained in:
parent
b1aefe892e
commit
d2e04a38ff
31
rocm.sh
31
rocm.sh
@ -1,6 +1,9 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Give correct perms to Apt version checker
|
||||||
|
chmod 755 ./ppp
|
||||||
|
|
||||||
# ROCm MIRROR
|
# ROCm MIRROR
|
||||||
mkdir -p ./output/rocm
|
mkdir -p ./output/rocm
|
||||||
cd ./output/rocm
|
cd ./output/rocm
|
||||||
@ -10,31 +13,15 @@ apt update
|
|||||||
apt upgrade -y
|
apt upgrade -y
|
||||||
# end of temp
|
# end of temp
|
||||||
|
|
||||||
# Get package list from ROCm Pool
|
#Get rid of Pika sources to prevent conflicts
|
||||||
wget http://repo.radeon.com/rocm/apt/5.6/dists/jammy/main/binary-amd64/Packages
|
|
||||||
# Get rid of Pika sources to prevent conflicts
|
|
||||||
rm -rf /etc/apt/sources.list.d/pika*
|
rm -rf /etc/apt/sources.list.d/pika*
|
||||||
rm -rf /etc/apt/preferences.d/*pika*
|
rm -rf /etc/apt/preferences.d/*pika*
|
||||||
|
|
||||||
for i in $(cat ./Packages | grep "Package: " | awk '{print $2}')
|
# Get ROCm pool
|
||||||
do
|
echo 'deb [arch=amd64 trusted=yes] https://repo.radeon.com/rocm/apt/5.6 jammy main' | sudo tee /etc/apt/sources.list.d/rocm.list
|
||||||
# Get ROCm pool from pika
|
apt update -y
|
||||||
echo 'deb [arch=amd64 signed-by=/etc/apt/keyrings/pika-keyring.gpg.key] https://ppa.pika-os.com/ lunar rocm' | sudo tee /etc/apt/sources.list.d/rocm-pika.list
|
|
||||||
apt update -y
|
apt download $(../../ppp https://ppa.pika-os.com/dists/lunar/rocm/binary-amd64/Packages http://repo.radeon.com/rocm/apt/5.6/dists/jammy/main/binary-amd64/Packages | tr '\n' ' ') -y
|
||||||
apt-cache show $i | grep Version: > ./$i-pika.txt
|
|
||||||
rm -rf /etc/apt/sources.list.d/rocm-pika.list
|
|
||||||
# Get ROCm pool
|
|
||||||
echo 'deb [arch=amd64 trusted=yes] https://repo.radeon.com/rocm/apt/5.6 jammy main' | sudo tee /etc/apt/sources.list.d/rocm.list
|
|
||||||
apt update -y
|
|
||||||
apt-cache show $i | grep Version: > ./$i-repo.txt
|
|
||||||
if [[ $(cat ./$i-pika.txt ) == $(cat ./$i-repo.txt ) ]]
|
|
||||||
then
|
|
||||||
true
|
|
||||||
else
|
|
||||||
echo $i >> pkglist.txt
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
apt download $(cat ./pkglist.txt | tr '\n' ' ') -y
|
|
||||||
# Return to ROCm MIRROR
|
# Return to ROCm MIRROR
|
||||||
cd ../
|
cd ../
|
||||||
mkdir -p ./output
|
mkdir -p ./output
|
||||||
|
Loading…
Reference in New Issue
Block a user