#!/bin/bash # # Script to prepare source code and binary distribution files of rEFInd. # By Rod Smith, 3/11/2012 # Updated 11/8/2012 to do more things automatically # # Usage: ./mkdistrib version # where "version" is a version number # MUST be run from an x86-64 system, on which the TianoCore build # includes both X64 and IA32 build support ("TARGET_ARCH = IA32 X64" # in Conf/target.txt). StartDir=`pwd` make clean # Prepare a place and copy files there.... mkdir -p ../snapshots/$1/refind-$1/icons cp --preserve=timestamps icons/*icns ../snapshots/$1/refind-$1/icons/ cp -a docs images include EfiLib libeg refind filesystems install.sh CREDITS.txt NEWS.txt BUILDING.txt COPYING.txt LICENSE.txt README.txt refind.inf Make.tiano Make.common Makefile refind.conf-sample ../snapshots/$1/refind-$1 # Go there and prepare a souce code zip file.... cd ../snapshots/$1/ zip -9r refind-src-$1.zip refind-$1 # Build the IA32 binaries cd refind-$1 ARCH=ia32 make ARCH=ia32 make fs mkdir -p refind-bin-$1/refind/drivers_ia32 cp --preserve=timestamps drivers/*_ia32.efi refind-bin-$1/refind/drivers_ia32/ cp --preserve=timestamps filesystems/LICENSE*txt refind-bin-$1/refind/drivers_ia32/ cp refind/refind_ia32.efi refind-bin-$1/refind/refind_ia32.efi cp refind/refind_ia32.efi $StartDir/ # Build the X64 binaries make clean make make fs mkdir -p refind-bin-$1/refind/drivers_x64 cp -a icons refind-bin-$1/refind/ cp --preserve=timestamps drivers/*_x64.efi refind-bin-$1/refind/drivers_x64/ cp --preserve=timestamps filesystems/LICENSE*txt refind-bin-$1/refind/drivers_x64/ cp --preserve=timestamps refind.conf-sample refind-bin-$1/refind/ cp refind/refind_x64.efi refind-bin-$1/refind/refind_x64.efi cp refind/refind_x64.efi $StartDir cp -a COPYING.txt LICENSE.txt README.txt docs CREDITS.txt install.sh refind-bin-$1 # Prepare the final .zip file and clean up zip -9r ../refind-bin-$1.zip refind-bin-$1 cd .. rm -r refind-$1 cd $StartDir