forked from andrespp/docker-pdi
-
Notifications
You must be signed in to change notification settings - Fork 1
/
entrypoint.sh
executable file
·69 lines (58 loc) · 1001 Bytes
/
entrypoint.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
# Sets script to fail if any command fails.
set -e
set_xauth() {
echo xauth add $DISPLAY . $XAUTH
touch /.Xauthority
xauth add $DISPLAY . $XAUTH
}
custom_properties() {
if [ -f /jobs/kettle.properties ] ; then
cp /jobs/kettle.properties $KETTLE_HOME
fi
}
run_pan() {
custom_properties
echo ./pan.sh -file $@
pan.sh -file /jobs/$@
}
run_kitchen() {
custom_properties
echo ./kitchen.sh -file $@
kitchen.sh -file /jobs/$@
}
run_spoon() {
custom_properties
set_xauth
echo /data-integration/spoon.sh
/data-integration/spoon.sh
}
print_usage() {
echo "
Usage: $0 COMMAND
Pentaho Data Integration (PDI)
Options:
runj filename Run job file
runt filename Run transformation file
spoon Run spoon (GUI)
help Print this help
"
}
case "$1" in
help)
print_usage
;;
runt)
shift 1
run_pan "$@"
;;
runj)
shift 1
run_kitchen "$@"
;;
spoon)
run_spoon
;;
*)
exec "$@"
esac