1
1
#!/usr/bin/env python3
2
2
# coding=utf-8
3
+ import os
3
4
import sys
4
5
from argparse import ArgumentParser
5
6
from collections import Counter
@@ -68,6 +69,7 @@ def deploy(source_dir, to_archive, tests=False):
68
69
source_files = set (glob1 (source_dir , '*.c' ) + glob1 (source_dir , '*.h' ) + glob1 (source_dir , 'Makefile' ))
69
70
source_files .add (join (source_dir , '../rozdeleni' ))
70
71
source_files .add (join (source_dir , '../rozsireni' ))
72
+ source_files .add (join (source_dir , '../doc/build/doc.pdf' ))
71
73
72
74
to_archive = '{}.tgz' .format (to_archive )
73
75
try :
@@ -90,6 +92,9 @@ def deploy(source_dir, to_archive, tests=False):
90
92
if basename (file_ ) in {'rozsireni' , 'rozdeleni' }:
91
93
target_archive .add (file_ , arcname = basename (file_ ))
92
94
continue
95
+ if basename (file_ ) in {'doc.pdf' , }:
96
+ target_archive .add (file_ , arcname = 'dokumentace.pdf' )
97
+ continue
93
98
94
99
modified = mktemp ()
95
100
@@ -108,8 +113,11 @@ def main():
108
113
description = 'Script for deploying archive with IFJ17 compiler.' ,
109
114
)
110
115
111
- parser .add_argument ("source_dir" , help = "path to src of project" )
112
- parser .add_argument ("archive_name" , help = "name of produced" )
116
+ parser .add_argument (
117
+ "--source_dir" , help = "path to src of project" , type = str ,
118
+ default = os .path .expanduser ('~/projects/IFJ-VUT-BIT-2017-2018/src' )
119
+ )
120
+ parser .add_argument ("--archive_name" , help = "name of produced" , type = str , default = 'xkobel02' )
113
121
parser .add_argument ("--tests" , help = "include tests?" , action = 'store_true' )
114
122
115
123
args = parser .parse_args ()
0 commit comments