forked from nlm/docker-pyinstaller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
entrypoint.sh
executable file
·62 lines (54 loc) · 950 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
#!/bin/bash -eu
cmd_usage()
{
echo "usage: $0 COMMAND"
echo "commands:"
echo " autobuild builds using .pyinstaller.yml"
echo " build invokes pyinstaller"
echo " clean removes the build/ directory"
echo " distclean cleans and removes the dist/ directory"
echo " exec executes a command"
echo " shell runs a shell"
}
cmd_autobuild()
{
if [ -f '.pyinstaller.yml' ]
then
exec pyinstaller-helper .pyinstaller.yml
else
echo "no .pyinstaller.yml file found"
return 1
fi
}
cmd_build()
{
exec pyinstaller $@
}
cmd_clean()
{
rm -fr ./build/
}
cmd_distclean()
{
cmd_clean
rm -fr ./dist/
}
cmd_exec()
{
exec $@
}
cmd_shell()
{
exec /bin/bash
}
case "$1" in
autobuild|build|clean|distclean|exec|shell)
cmd="$1"
shift
cmd_${cmd} $@
;;
*)
cmd_usage
exit 1
;;
esac