forked from msekletar/systemd-boot
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild_project.sh
executable file
·60 lines (45 loc) · 1.59 KB
/
build_project.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/sh
set -ex
# Remove the old artifacts.
rm -rf systemd-boot_installed
# Navigate to the main project directory.
cd project
if [ -f Makefile ] ; then
make distclean
fi
# Configure, build and install 'systemd-boot' in local folder.
./autogen.sh
./configure --prefix=$PWD/../systemd-boot_installed/usr
make
make install
cd ..
if [ -f systemd-boot_installed/usr/lib/systemd-boot/systemd-boot*.efi ] ; then
cat << CEOF
###################################################################
# #
# UEFI boot loader image has been generated. Check this folder: #
# #
# systemd-boot_installed/usr/lib/systemd-boot #
# #
###################################################################
CEOF
else
cat << CEOF
There is something wrong with the build process.
CEOF
fi
if [ -f systemd-boot_installed/usr/lib/systemd-boot/systemd-bootx64.efi ] ; then
if [ -f work/uefi_root/EFI/BOOT/BOOTx64.EFI ] ; then
cp systemd-boot_installed/usr/lib/systemd-boot/systemd-bootx64.efi \
work/uefi_root/EFI/BOOT/BOOTx64.EFI
cat << CEOF
##############################################
# #
# UEFI boot loader image has been updated. #
# #
# work/uefi_root/EFI/BOOT/BOOTx64.EFI #
# #
##############################################
CEOF
fi
fi