File: shellscript.sh

package info (click to toggle)
swupdate 2022.12%2Bdfsg-4%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,904 kB
  • sloc: ansic: 54,399; perl: 6,317; cpp: 1,829; makefile: 989; sh: 704; yacc: 613; lex: 373; python: 285; javascript: 238
file content (34 lines) | stat: -rw-r--r-- 446 bytes parent folder | download
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
#!/bin/sh
# SPDX-FileCopyrightText: 2021 Stefano Babic <sbabic@denx.de>
# SPDX-License-Identifier: CC0-1.0

#example type = "shellscript";

do_preinst()
{
    echo "do_preinst"
    exit 0
}

do_postinst()
{
    echo "do_postinst"
    exit 0
}

echo $0 $1 > /dev/ttyO0

case "$1" in
preinst)
    echo "call do_preinst"
    do_preinst
    ;;
postinst)
    echo "call do_postinst"
    do_postinst
    ;;
*)
    echo "default"
    exit 1
    ;;
esac