source: trunk/dsys/funcSETUP@ 1

Last change on this file since 1 was 1, checked in by katerina, 19 years ago

Initial import

File size: 1.2 KB
Line 
1#########################################################################
2#
3# Setup test Subroutines
4#
5#########################################################################
6
7# test setup
8#
9testSETUP1() {
10 test -d "$basedir" || printFATAL "Basedir $basedir does not exist"
11 test -d "$basedir/tmp" || printFATAL "Tmpdir $basedir/tmp does not exist"
12 tmpdir="$basedir/tmp"; export tmpdir
13 return 0
14}
15
16# test setup
17#
18testSETUP2() {
19 test -z "$action" &&
20 {
21 promptMENU "Which action do you want to perform" "install" "build" "download" "checksrc" "clean" "info" "uninstall";
22 action="$MENU"; export action;
23 }
24 if (test x"$action" = xbuild || test x"$action" = xinstall || test x"$action" = xuninstall)
25 then
26 test -z "$host" &&
27 {
28 promptINPUT "On which host do you want to $action";
29 host="$INPUT"; export host;
30 }
31 fi
32 return 0
33}
34
35setupFORMAT() {
36
37 tmp_format=`echo "${1}" | sed '/^\(.*\)\.\([0-9a-zA-Z]*\)$/{ s//\2/; q; }'`
38 echo "${tmp_format}"
39}
40
41setupVERSION() {
42 tmp_version=`echo ${DB_version} | sed s%\.run%% | sed s%\.rpm%% | sed s%\.depot%% | sed s%\.deb%% | sed s%\.tbz2%% | sed s%\.pkg%%`
43 echo "${tmp_version}"
44
45}
Note: See TracBrowser for help on using the repository browser.