This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure_systemd_bootsplash.sh
executable file
·43 lines (27 loc) · 1.7 KB
/
configure_systemd_bootsplash.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
#!/bin/bash
show_current_task
#--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --
exportdefvar ppmtofbimg_GITURL "https://github.com/rst"
exportdefvar ppmtofbimg_GITREPO "raspberry-compote"
exportdefvar ppmtofbimg_BRANCH "master"
exportdefvar ppmtofbimg_REVISION ""
exportdefvar ppmtofbimg_RECOMPILE n
#--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -
# GET PACKAGES --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
if ! ( get_git_pkg "${ppmtofbimg_GITURL}" "${ppmtofbimg_GITREPO}" "${ppmtofbimg_BRANCH}" "${ppmtofbimg_REVISION}" ) ; then goto_exit 1 ; fi
#--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -
# INSTALL PACKAGES - --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -
if ! pushd "${CACHE}/${ppmtofbimg_GITREPO}-${ppmtofbimg_BRANCH}/ppmtofbimg" ; then goto_exit 2 ; fi
if ! ( "$CC" -O2 -o ppmtofbimg ppmtofbimg.c ) ; then exit 3 ; fi
if ! ( preAuthRoot && sudo cp "ppmtofbimg" "${SYSROOT}/opt/" ) ; then exit 4 ; fi
preAuthRoot && sudo cp "test24.ppm" "${SYSROOT}/opt/"
preAuthRoot && echo "[Unit]
Description=boot splash screen
[Service]
ExecStart=/opt/ppmtofbimg /opt/test24.ppm
[Install]
WantedBy=basic.target" | sudo tee "${SYSROOT}/etc/systemd/system/boot-image.service"
preAuthRoot && sudo chroot "${SYSROOT}" systemctl enable boot-image.service
popd
#--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -
show_message "ppmtofbimg WAS SUCCESSFULLY INSTALLED!"