forked from msekletar/systemd-boot
-
Notifications
You must be signed in to change notification settings - Fork 9
/
generate_release.sh
executable file
·41 lines (27 loc) · 1002 Bytes
/
generate_release.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
#!/bin/sh
set -e
SRC_DIR=$PWD
mkdir -p $SRC_DIR/work/release
cd $SRC_DIR/work/release
DATE_PARSED=`LANG=en_US ; date +"%d-%b-%Y"`
RELEASE_NAME=systemd-boot_$DATE_PARSED
RELEASE_DIR=$SRC_DIR/work/release/$RELEASE_NAME
rm -rf $RELEASE_DIR*
mkdir -p $RELEASE_DIR
cp -r $SRC_DIR/work/uefi_root \
$RELEASE_DIR
rm -rf $RELEASE_DIR/uefi_root/loader
cp -r $SRC_DIR/samples/uefi_root/loader \
$RELEASE_DIR/uefi_root
cd $SRC_DIR/work/release
tar -cvf $RELEASE_NAME.tar $RELEASE_NAME
xz -z -k -9 -e systemd-boot_${DATE_PARSED}.tar
cat << CEOF
############################################################
# #
# systemd-boot release '${DATE_PARSED}' has been generated. #
# #
# work/release/systemd-boot_${DATE_PARSED}.tar.xz #
# #
############################################################
CEOF