"Fossies" - the Fresh Open Source Software Archive 
Member "libisoburn-1.5.6/releng/template_new" (8 Jul 2020, 3872 Bytes) of package /linux/misc/libisoburn-1.5.6.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
1 #!/bin/bash
2
3 # Copyright 2011 George Danchev <danchev@spnet.net>
4 # Copyright 2011 Thomas Schmitt <scdbackup@gmx.net>
5 # === TEMPLATE: Add your own copyright here
6 #
7 # Licensed under GNU GPL version 2 or later
8
9 # === TEMPLATE: Remove this remark before releasing this script.
10 #
11 # This is a template for creating a new libisoburn/releng test.
12 # It is supposed that you have read releng/README before you begin to work
13 # here.
14 #
15 # Step 1: Invent a name for your test
16 # test_name="manual_"...some.name...
17 # or
18 # test_name="auto_"...some.name...
19 #
20 # Step 2: Copy releng/template_new to $test_name
21 #
22 # Step 3: Edit $test_name and process any line that begins by
23 # "# === TEMPLATE:". Do what the line prescribes and then remove it
24 # from the script. You are not done as long as such a line remains.
25 #
26 # === TEMPLATE: End of remark to remove
27
28 set -e
29
30
31 # === TEMPLATE: Describe your own specific options (if any) and the test
32 print_specific_help() {
33 cat << HLP
34 Specific options:
35 --option Explanation of specific option
36 Overview:
37 Short explanation of test purpose and activities.
38 HLP
39 }
40
41
42 getopts_inc=inc/releng_getopts.inc
43 if test -e "$getopts_inc"
44 then
45 . "$getopts_inc"
46
47 if test "$SPECIFIC_HELP" = 1
48 then
49 print_specific_help
50 exit 0
51 fi
52 else
53 echo >&2
54 echo "File not found: $getopts_inc" >&2
55 echo "Are we in the ./releng directory of a libisoburn SVN checkout ?" >&2
56 echo "(Please execute the tests from that ./releng directory.)" >&2
57 echo >&2
58 exit 29
59 fi
60
61
62 # === TEMPLATE: Decide whether the test will have own options,
63 # === TEMPLATE: apart from those interpreted by inc/releng_getopts.inc
64 # === TEMPLATE: If not, then remove this interpreter code.
65 # Set default values for specific option variables. E.g.:
66 # dev=
67 # Interpret specific options, they begin after the first --.
68 next_is=ignore
69 for i in "$@"
70 do
71 if test "$next_is" = "ignore"
72 then
73 if test "$i" = "--"
74 then
75 next_is=""
76 fi
77
78 # === TEMPLATE: Implement interpretation of specific options. Like:
79 # elif test "$next_is" = "dev"
80 # then
81 # dev="$i"
82 # next_is=""
83 # elif test "$i" = "--dev"
84 # then
85 # next_is="dev"
86
87 else
88 echo >&2
89 echo "Unknown test specific option: $i" >&2
90 print_help
91 print_specific_help
92 exit 31
93 fi
94 done
95 # === TEMPLATE: End of own option interpreter code.
96
97
98 # Each test should decide whether or not it needs
99 # a xorriso binary to test, since some do compilations only.
100 # === TEMPLATE: Decide whether you need a xorriso program.
101 # === TEMPLATE: If not, then remove this function call
102 check_for_xorriso -x
103
104
105 # check data dir, if any and after checking -x xorriso
106 # === TEMPLATE: Decide whether your test will possibly create own files.
107 # === TEMPLATE: If yes, then create your files underneath ${GEN_DATA_DIR}.
108 # === TEMPLATE: The name in this variable is set by inc/releng_getopts.inc .
109 # === TEMPLATE: If not, then remove this if ... fi statement.
110 if [ -d "${GEN_DATA_DIR}" ]; then
111 printf "\n${SELF}: directory %s exists!" ${GEN_DATA_DIR}
112 printf "\n${SELF}: use '${SELF} -c' to remove.\n"
113 exit 30
114 else
115 mkdir "${GEN_DATA_DIR}"
116 fi
117
118
119 #####################################################################
120
121
122 # === TEMPLATE: Perform your test activities here.
123
124
125 # === TEMPLATE: In case of failure, issue a line to stdout that begins by
126 # === TEMPLATE: the word "FAIL", and make sure that the test script finally
127 # === TEMPLATE: returns a non-zero exit value.
128 # === TEMPLATE: 31 = Unknown option or unusable argument with known option
129 # === TEMPLATE: 30 = Unexpected state of own directory for self generated files
130 # === TEMPLATE: 29 = Not in ./releng directory or missing essential parts
131 # === TEMPLATE: 1 to 28 = test specific exit values
132 # === TEMPLATE: When exiting prematurely, make sure to call cleanup.
133
134 cleanup
135 exit 0