Shell scripts: POSIX + correct error reporting

This commit is contained in:
Louis Gesbert 2022-07-19 11:54:38 +02:00
parent 6d224e1a41
commit 19dbce895c
10 changed files with 32 additions and 13 deletions

View File

@ -1,5 +1,6 @@
#! /usr/bin/env bash
set -euo pipefail
#! /usr/bin/env sh
set -eu
cd "$(dirname "$0")"
python3 -m venv env

View File

@ -1,9 +1,11 @@
#! /usr/bin/env bash
#! /usr/bin/env sh
set -eu
cd "$(dirname "$0")"
if [[ $1 == "" ]]; then
echo "USAGE: $1 DST where DST is the directory in which files have to be copied"
if [ $# -eq 0 ]; then
echo "USAGE: \$1 DST where DST is the directory in which files have to be copied"
exit 1
fi

View File

@ -1,4 +1,6 @@
#! /usr/bin/env bash
#! /usr/bin/env sh
set -eu
cd "$(dirname "$0")"
cd pygments && python3 setup.py develop --user

View File

@ -1,4 +1,6 @@
#! /usr/bin/env bash
#! /usr/bin/env sh
set -eu
FILE=~/.atom/packages/catala_en
SCRIPT=`realpath $0`

View File

@ -1,4 +1,6 @@
#! /usr/bin/env bash
#! /usr/bin/env sh
set -eu
FILE=~/.vscode/extensions/catala-en
SCRIPT=`realpath $0`

View File

@ -1,4 +1,6 @@
#! /usr/bin/env bash
#! /usr/bin/env sh
set -ue
cd "$(dirname "$0")"
cd pygments && python3 setup.py develop --user

View File

@ -1,4 +1,6 @@
#! /usr/bin/env bash
#! /usr/bin/env sh
set -eu
FILE=~/.atom/packages/catala_fr
SCRIPT=`realpath $0`

View File

@ -1,4 +1,6 @@
#! /usr/bin/env bash
#! /usr/bin/env sh
set -eu
FILE=~/.vscode/extensions/catala-fr
SCRIPT=`realpath $0`

View File

@ -1,4 +1,6 @@
#! /usr/bin/env bash
#! /usr/bin/env sh
set -eu
cd "$(dirname "$0")"
cd pygments && python3 setup.py develop --user

View File

@ -1,4 +1,6 @@
#! /usr/bin/env bash
#! /usr/bin/env sh
set -eu
FILE=~/.atom/packages/catala_pl
SCRIPT=`realpath $0`