mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-21 22:34:05 +00:00
check bootstrap scripts syntax
Signed-off-by: ozkanonur <work@onurozkan.dev>
This commit is contained in:
parent
9d795a6e6e
commit
eea6202c24
5
x
5
x
@ -7,9 +7,12 @@
|
|||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
# syntax check
|
||||||
|
sh -n $0
|
||||||
|
|
||||||
realpath() {
|
realpath() {
|
||||||
if [ -d "$1" ]; then
|
if [ -d "$1" ]; then
|
||||||
CDPATH='' command cd "$1" && pwd -P
|
CDPATH='' command cd "$1" && pwd -P
|
||||||
else
|
else
|
||||||
echo "$(realpath "$(dirname "$1")")/$(basename "$1")"
|
echo "$(realpath "$(dirname "$1")")/$(basename "$1")"
|
||||||
fi
|
fi
|
||||||
|
5
x.ps1
5
x.ps1
@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
# See ./x for why these scripts exist.
|
# See ./x for why these scripts exist.
|
||||||
|
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
# syntax check
|
||||||
|
Get-Command -syntax ${PSCommandPath}
|
||||||
|
|
||||||
$xpy = Join-Path $PSScriptRoot x.py
|
$xpy = Join-Path $PSScriptRoot x.py
|
||||||
# Start-Process for some reason splits arguments on spaces. (Isn't powershell supposed to be simpler than bash?)
|
# Start-Process for some reason splits arguments on spaces. (Isn't powershell supposed to be simpler than bash?)
|
||||||
# Double-quote all the arguments so it doesn't do that.
|
# Double-quote all the arguments so it doesn't do that.
|
||||||
|
Loading…
Reference in New Issue
Block a user