FreeCAD

Форк
0
/
fcbt.py 
60 строк · 1.8 Кб
1
#!python
2
#  FreeCAD Build Tool
3
# (c) 2004 Juergen Riegel
4

5

6
import sys
7

8
help1 = """
9
FreeCAD Build Tool
10
Usage:
11
   fcbt <command name> [command parameter]
12
possible commands are:
13
 - DistSrc         (DS)   Build a source Distr. of the current source tree
14
 - DistBin         (DB)   Build a binary Distr. of the current source tree
15
 - DistSetup       (DI)   Build a Setup Distr. of the current source tree
16
 - DistSetup       (DUI)  Build a User Setup Distr. of the current source tree
17
 - DistAll         (DA)   Run all three above modules
18
 - NextBuildNumber (NBN)  Increase the Build Number of this Version
19
 - CreateModule    (CM)   Insert a new FreeCAD Module in the module directory
20
 - CreatePyModule  (CP)   Insert a new FreeCAD Python Module in the module directory
21

22
For help on the modules type:
23
  fcbt <command name> ?
24

25
"""
26

27
if len(sys.argv) < 2:
28
    sys.stdout.write(help1)
29
    sys.stdout.write("Insert command: ")
30
    sys.stdout.flush()
31
    CmdRaw = sys.stdin.readline()[:-1]
32
else:
33
    CmdRaw = sys.argv[1]
34

35
Cmd = CmdRaw.lower()
36

37

38
if Cmd == "distsrc" or Cmd == "ds":
39
    import fcbt.DistSrc
40
elif Cmd == "distbin" or Cmd == "db":
41
    import fcbt.DistBin
42
elif Cmd == "distsetup" or Cmd == "di":
43
    import fcbt.DistSetup
44
elif Cmd == "distsetup" or Cmd == "dui":
45
    import fcbt.DistUserSetup
46
elif Cmd == "distall" or Cmd == "da":
47
    import fcbt.DistSrc
48
    import fcbt.DistBin
49
    import fcbt.DistSetup
50
elif Cmd == "nextbuildnumber" or Cmd == "nbn":
51
    import fcbt.NextBuildNumber
52
elif Cmd == "createmodule" or Cmd == "cm":
53
    import fcbt.CreateModule
54
elif Cmd == "createpymodule" or Cmd == "cp":
55
    import fcbt.CreatePyModule
56
elif Cmd == "?" or Cmd == "help" or Cmd == "/h" or Cmd == "/?" or Cmd == "-h" or Cmd == "-help":
57
    sys.stdout.write(help1)
58
else:
59
    print(CmdRaw + " is an unknown command!\n")
60
    sys.exit(1)
61

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.