-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path12_get_systemd-boot.sh
executable file
·50 lines (35 loc) · 1.07 KB
/
12_get_systemd-boot.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
#!/bin/sh
set -e
# Load common properties and functions in the current script.
. ./common.sh
download() {
# Read the 'SYSTEMD-BOOT_SOURCE_URL' property from '.config'.
DOWNLOAD_URL=`read_property SYSTEMD-BOOT_SOURCE_URL`
# Grab everything after the last '/' character.
ARCHIVE_FILE=${DOWNLOAD_URL##*/}
# Download systemd-boot source archive in the 'source' directory.
download_source $DOWNLOAD_URL $SOURCE_DIR/$ARCHIVE_FILE
# Extract the 'systemd-boot' sources in the 'work/systemd-boot' directory.
extract_source $SOURCE_DIR/$ARCHIVE_FILE systemd-boot
}
echo "*** GET SYSTEMD-BOOT BEGIN ***"
# Read the 'FIRMWARE_TYPE' property from '.config'.
FIRMWARE_TYPE=`read_property FIRMWARE_TYPE`
echo "Firmware type is '$FIRMWARE_TYPE'."
case $FIRMWARE_TYPE in
uefi)
download
;;
both)
download
;;
bios)
echo "'systemd-boot' download has been skipped."
;;
*)
echo "Firmware type '$FIRMWARE_TYPE' is not recognized. Cannot continue."
;;
esac
# We go back to the main MLL source folder.
cd $SRC_DIR
echo "*** GET SYSTEMD-BOOT END ***"