Shell programming hygiene (#97884)

This commit is contained in:
Samuel Ainsworth 2020-09-13 09:09:05 -07:00 committed by GitHub
parent 972fc49364
commit a8d6213726
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,8 @@
#!/usr/bin/env nix-shell #!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnugrep gnused gawk #!nix-shell -i bash -p curl gnugrep gnused gawk
set -eou pipefail
ROOT="$(dirname "$(readlink -f "$0")")" ROOT="$(dirname "$(readlink -f "$0")")"
if [ ! -f "$ROOT/vscode.nix" ]; then if [ ! -f "$ROOT/vscode.nix" ]; then
echo "ERROR: cannot find vscode.nix in $ROOT" echo "ERROR: cannot find vscode.nix in $ROOT"