##// END OF EJS Templates
Add way to install MathJax to a particular profile
Kyle Kelley -
Show More
@@ -200,6 +200,12 b' def main() :'
200 )
200 )
201
201
202 parser.add_argument(
202 parser.add_argument(
203 '-p',
204 '--profile',
205 default='default',
206 help='profile to install MathJax to. Takes precedence over install-dir option')
207
208 parser.add_argument(
203 '-i',
209 '-i',
204 '--install-dir',
210 '--install-dir',
205 default=default_dest,
211 default=default_dest,
@@ -208,12 +214,12 b' def main() :'
208 '-d',
214 '-d',
209 '--dest',
215 '--dest',
210 action='store_true',
216 action='store_true',
211 help='print where is current mathjax would be installed and exit')
217 help='print where current mathjax would be installed and exit')
212 parser.add_argument(
218 parser.add_argument(
213 '-r',
219 '-r',
214 '--replace',
220 '--replace',
215 action='store_true',
221 action='store_true',
216 help='Wether to replace current mathjax if already exist')
222 help='Whether to replace current mathjax if it already exists')
217 parser.add_argument(
223 parser.add_argument(
218 '-t',
224 '-t',
219 '--test',
225 '--test',
@@ -225,7 +231,14 b' def main() :'
225
231
226 pargs = parser.parse_args()
232 pargs = parser.parse_args()
227
233
228 dest = pargs.install_dir
234 if(pargs.profile):
235 profile = pargs.profile
236 static = os.path.join(locate_profile(profile), 'static')
237 dest = os.path.join(static, 'mathjax')
238 else:
239 dest = pargs.install_dir
240
241
229 if pargs.dest :
242 if pargs.dest :
230 print dest
243 print dest
231 return
244 return
General Comments 0
You need to be logged in to leave comments. Login now