mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
tweak mach files a little bit (#34485)
Signed-off-by: Peter MIKOLA <mikopet@mikopet.dev>
This commit is contained in:
parent
3515b83a95
commit
4ddbdc61a3
2 changed files with 4 additions and 9 deletions
8
mach
8
mach
|
@ -1,14 +1,8 @@
|
||||||
#!/bin/sh
|
#!/usr/bin/env python3
|
||||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
# The beginning of this script is both valid shell and valid python,
|
|
||||||
# such that the script starts with the shell and is reexecuted with
|
|
||||||
# the right python.
|
|
||||||
''':' && if [ ! -z "$MSYSTEM" ] ; then exec python "$0" "$@" ; else which python3 > /dev/null 2> /dev/null && exec python3 "$0" "$@" || exec python "$0" "$@" ; fi
|
|
||||||
'''
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
5
mach.bat
5
mach.bat
|
@ -1,8 +1,9 @@
|
||||||
@echo off
|
@echo off
|
||||||
|
set workdir=%~dp0
|
||||||
|
|
||||||
where /Q py.exe
|
where /Q py.exe
|
||||||
IF %ERRORLEVEL% NEQ 0 (
|
IF %ERRORLEVEL% NEQ 0 (
|
||||||
python mach %*
|
python %workdir%mach %*
|
||||||
) ELSE (
|
) ELSE (
|
||||||
py -3 mach %*
|
py -3 %workdir%mach %*
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue