diff options
-rwxr-xr-x | files/mga_rpms/update_media.sh | 130 |
1 files changed, 66 insertions, 64 deletions
diff --git a/files/mga_rpms/update_media.sh b/files/mga_rpms/update_media.sh index b26a23f..75aa914 100755 --- a/files/mga_rpms/update_media.sh +++ b/files/mga_rpms/update_media.sh @@ -1,6 +1,29 @@ bcdmedia=/home/bcd/build_bcd/pieces/cauldron +copy_latest() +{ + repo=$1 + for arch in i586 x86_64 ; do + if [ $2 = "lib" ] ; then + if [ $arch = "x86_64" ] ; then + name=lib64$3 + else + name=lib$3 + fi + else + name=$2 + fi + path=`ls -1v $bcdmedia/$arch/media/$repo/{release,updates}/$name.rpm 2> /dev/null | tail -1` + if [ -z $path ] ; then + echo "Couldn't find $name for $arch" + exit 1 + else + cp $path $arch/mga_rpms/$repo/ + fi + done +} + # create dirs if non-existant mkdir -p {i586,x86_64}/mga_rpms/{core,nonfree}/media_info @@ -8,76 +31,55 @@ mkdir -p {i586,x86_64}/mga_rpms/{core,nonfree}/media_info rm -f {i586,x86_64}/mga_rpms/{core,nonfree}/*.rpm rm -f {i586,x86_64}/mga_rpms/{core,nonfree}/media_info/* -# add grub2 stuff -cp $bcdmedia/i586/media/core/release/grub2-2*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/grub2-common-2*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/grub2-efi-2*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/grub2-mageia-theme-*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/os-prober-*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/efibootmgr-*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/efivar-*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/libefivar0-*.rpm i586/mga_rpms/core/ - -cp $bcdmedia/x86_64/media/core/release/grub2-2*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/grub2-common-2*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/grub2-efi-2*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/grub2-mageia-theme-*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/os-prober-*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/efibootmgr-*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/efivar-*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/lib64efivar0-*.rpm x86_64/mga_rpms/core/ +# add grub2 +copy_latest core grub2-2* +copy_latest core grub2-efi-2* +copy_latest core grub2-mageia-theme-2* +copy_latest core os-prober-* +copy_latest core lib efivar0-* +copy_latest core efibootmgr-* +copy_latest core efivar-* -# add problematic font (mga#17223) -cp $bcdmedia/i586/media/core/release/fonts-otf-source-han-*.rpm i586/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/fonts-otf-source-han-*.rpm x86_64/mga_rpms/core/ +# add dkms +copy_latest core dkms-2* +copy_latest core binutils-2* +copy_latest core gcc-5* +copy_latest core gcc-cpp-5* +copy_latest core glibc-devel-* +copy_latest core isl-0* +copy_latest core kernel-desktop*-devel-4* +copy_latest core kernel-desktop*-devel-latest-4* +copy_latest core kernel-userspace-headers-4* +copy_latest core lib isl15-0* +copy_latest core lib mpc3-1* +copy_latest core lib ncurses-devel-* +copy_latest core libstdc++-devel-* +copy_latest core make-4* -# add dkms stuff -cp $bcdmedia/i586/media/core/release/libstdc++-devel*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/dkms-2*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/gcc-5*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/gcc-cpp-5*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/glibc-devel*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/isl-0*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/kernel-desktop586-devel-*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/kernel-userspace-headers-*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/libisl15-0*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/libmpc3-1*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/libncurses-devel*.rpm i586/mga_rpms/core/ -cp $bcdmedia/i586/media/core/release/make-4*.rpm i586/mga_rpms/core/ - -cp $bcdmedia/x86_64/media/core/release/libstdc++-devel*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/dkms-2*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/gcc-5*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/gcc-cpp-5*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/glibc-devel*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/isl-0*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/kernel-desktop-devel-*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/kernel-userspace-headers-*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/lib64isl15-0*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/lib64mpc3-1*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/lib64ncurses-devel*.rpm x86_64/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/make-4*.rpm x86_64/mga_rpms/core/ - -# add broadcom wireless configs -cp $bcdmedia/i586/media/core/release/broadcom-*-config-*.rpm i586/mga_rpms/core/ -cp $bcdmedia/x86_64/media/core/release/broadcom-*-config-*.rpm x86_64/mga_rpms/core/ +# add nvidia +copy_latest nonfree dkms-nvidia304-* +copy_latest nonfree dkms-nvidia340-* +copy_latest nonfree dkms-nvidia-current-* +copy_latest nonfree x11-driver-video-nvidia304-* +copy_latest nonfree x11-driver-video-nvidia340-* +copy_latest nonfree x11-driver-video-nvidia-current-* # add broadcom-wl -cp $bcdmedia/i586/media/nonfree/release/broadcom-wl-common*.rpm i586/mga_rpms/nonfree/ -cp $bcdmedia/i586/media/nonfree/release/dkms-broadcom-wl-*.rpm i586/mga_rpms/nonfree/ +copy_latest nonfree dkms-broadcom-wl-* +copy_latest nonfree broadcom-wl-common-* -cp $bcdmedia/x86_64/media/nonfree/release/broadcom-wl-common-*.rpm x86_64/mga_rpms/nonfree/ -cp $bcdmedia/x86_64/media/nonfree/release/dkms-broadcom-wl-*.rpm x86_64/mga_rpms/nonfree/ +# add broadcom wireless configs +copy_latest core broadcom-bcma-config-* +copy_latest core broadcom-ssb-config-* # add repo pubkeys -cp $bcdmedia/i586/media/core/release/media_info/pubkey i586/mga_rpms/core/media_info/ -cp $bcdmedia/x86_64/media/core/release/media_info/pubkey x86_64/mga_rpms/core/media_info/ - -cp $bcdmedia/i586/media/nonfree/release/media_info/pubkey i586/mga_rpms/nonfree/media_info/ -cp $bcdmedia/x86_64/media/nonfree/release/media_info/pubkey x86_64/mga_rpms/nonfree/media_info/ +for arch in i586 x86_64 ; do + cp $bcdmedia/$arch/media/core/release/media_info/pubkey $arch/mga_rpms/core/media_info/ + cp $bcdmedia/$arch/media/nonfree/release/media_info/pubkey $arch/mga_rpms/nonfree/media_info/ +done # create hdlists -genhdlist2 i586/mga_rpms/core -genhdlist2 i586/mga_rpms/nonfree -genhdlist2 x86_64/mga_rpms/core -genhdlist2 x86_64/mga_rpms/nonfree +for arch in i586 x86_64 ; do + genhdlist2 $arch/mga_rpms/core + genhdlist2 $arch/mga_rpms/nonfree +done |