diff options
Diffstat (limited to 'files/mga_rpms/update_media.sh')
-rwxr-xr-x | files/mga_rpms/update_media.sh | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/files/mga_rpms/update_media.sh b/files/mga_rpms/update_media.sh new file mode 100755 index 0000000..3fe9670 --- /dev/null +++ b/files/mga_rpms/update_media.sh @@ -0,0 +1,64 @@ + +bcdmedia=/home/bcd/build_bcd/pieces/5 + +copy_latest() +{ + repo=$1 + for arch in i586 x86_64 ; do + path=`ls -1v $bcdmedia/$arch/media/$repo/{release,updates}/$2.rpm 2> /dev/null | tail -1` + if [ -z $path ] ; then + echo "Couldn't find $2 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 + +# clean dirs +rm -f {i586,x86_64}/mga_rpms/{core,nonfree}/*.rpm +rm -f {i586,x86_64}/mga_rpms/{core,nonfree}/media_info/* + +# 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 fglrx +copy_latest nonfree dkms-fglrx-* +copy_latest nonfree x11-driver-video-fglrx-* + +# 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 +copy_latest nonfree dkms-broadcom-wl-* +copy_latest nonfree broadcom-wl-common-* + +# add broadcom wireless configs +copy_latest core broadcom-bcma-config-* +copy_latest core broadcom-ssb-config-* + +# add repo pubkeys +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 +for arch in i586 x86_64 ; do + genhdlist2 $arch/mga_rpms/core + genhdlist2 $arch/mga_rpms/nonfree +done |