• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1:<<"::WINDOWS_ONLY"
2@echo off
3:: Copyright 2020 The Pigweed Authors
4::
5:: Licensed under the Apache License, Version 2.0 (the "License"); you may not
6:: use this file except in compliance with the License. You may obtain a copy of
7:: the License at
8::
9::     https://www.apache.org/licenses/LICENSE-2.0
10::
11:: Unless required by applicable law or agreed to in writing, software
12:: distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13:: WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14:: License for the specific language governing permissions and limitations under
15:: the License.
16::WINDOWS_ONLY
17:; echo "ERROR: Attempting to run Windows .bat from a Unix/POSIX shell!"
18:; echo "Instead, run the following command."
19:; echo ""
20:; echo "    source ./bootstrap.sh"
21:; echo ""
22:<<"::WINDOWS_ONLY"
23
24if "%1"=="-3" (
25    for /f "tokens=1,* delims= " %%a in ("%*") do set ARGS=%%b
26) else (
27    echo ERROR: Pigweed's mini py launcher only supports python3.
28    exit /b 1
29)
30
31:: Ignore the `-3` flag, Pigweed's python is alwasy python3.
32call python %ARGS%
33
34::WINDOWS_ONLY
35