File: example.only_interactive

package info (click to toggle)
shellia 5.10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 792 kB
  • sloc: sh: 7,840; makefile: 34
file content (41 lines) | stat: -rwxr-xr-x 743 bytes parent folder | download | duplicates (4)
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/dash
# vim: set filetype=sh :
#        file: example.only_interactive
#   copyright: Bernd Schumacher <bernd.schumacher@hpe.com> (2007-2020)
#     license: GNU General Public License, version 3
# description: example using only ia.interactive library
#    see also: test.only_interactive
set -e
set -u

. ./ia.interactive

sub_sub()
{
  eval "$ia_init"
  ia_add "echo 2.3.1"
  ia_add "echo 2.3.2"
  ia
}

sub()
{
  eval "$ia_init"
  ia_add "echo 2.1"
  ia_add "echo 2.2 >&2"
  ia_add "echo 2.3"
  ia_add "sub_sub <-i>"
  ia_add "echo 2.4"
  ia_add "sh -c \"echo 2.5; exit 25\""
  ia_add "echo 2.6; exit 26"
  ia_add "echo 2.7"
  ia
}

eval "$ia_init"
ia_add "echo 1"
ia_add "echo 2"
ia_add "sub <-i>"
ia_add "echo 3"
ia_add "echo 4"
ia