mirror of
https://github.com/opencultureconsulting/orcli.git
synced 2025-03-30 00:00:52 +01:00
always set orcli alias
This commit is contained in:
parent
6b3ce8f37d
commit
9c6eebe520
20
orcli
20
orcli
@ -1584,10 +1584,8 @@ orcli_test_command() {
|
|||||||
for i in "${!files[@]}"; do
|
for i in "${!files[@]}"; do
|
||||||
set +e # do not exit on failed tests
|
set +e # do not exit on failed tests
|
||||||
bash -e <(
|
bash -e <(
|
||||||
if ! command -v orcli &>/dev/null; then
|
echo "shopt -s expand_aliases"
|
||||||
echo "shopt -s expand_aliases"
|
echo "alias orcli=${scriptpath}/orcli"
|
||||||
echo "alias orcli=${scriptpath}/orcli"
|
|
||||||
fi
|
|
||||||
awk 1 "${files[$i]}"
|
awk 1 "${files[$i]}"
|
||||||
) &>"$OPENREFINE_TMPDIR/test.log"
|
) &>"$OPENREFINE_TMPDIR/test.log"
|
||||||
results+=(${?})
|
results+=(${?})
|
||||||
@ -1877,9 +1875,7 @@ orcli_run_command() {
|
|||||||
# case 1: interactive mode if stdin is selected but not present
|
# case 1: interactive mode if stdin is selected but not present
|
||||||
bash --rcfile <(
|
bash --rcfile <(
|
||||||
cat ~/.bashrc
|
cat ~/.bashrc
|
||||||
if ! command -v orcli &>/dev/null; then
|
echo "alias orcli=${scriptpath}/orcli"
|
||||||
echo "alias orcli=${scriptpath}/orcli"
|
|
||||||
fi
|
|
||||||
interactive
|
interactive
|
||||||
) -i </dev/tty
|
) -i </dev/tty
|
||||||
exit
|
exit
|
||||||
@ -1889,9 +1885,7 @@ orcli_run_command() {
|
|||||||
# case 2: execute scripts and keep shell running
|
# case 2: execute scripts and keep shell running
|
||||||
bash --rcfile <(
|
bash --rcfile <(
|
||||||
cat ~/.bashrc
|
cat ~/.bashrc
|
||||||
if ! command -v orcli &>/dev/null; then
|
echo "alias orcli=${scriptpath}/orcli"
|
||||||
echo "alias orcli=${scriptpath}/orcli"
|
|
||||||
fi
|
|
||||||
for i in "${!files[@]}"; do
|
for i in "${!files[@]}"; do
|
||||||
log "executing script ${files[$i]}..."
|
log "executing script ${files[$i]}..."
|
||||||
awk 1 "${files[$i]}"
|
awk 1 "${files[$i]}"
|
||||||
@ -1903,10 +1897,8 @@ orcli_run_command() {
|
|||||||
for i in "${!files[@]}"; do
|
for i in "${!files[@]}"; do
|
||||||
log "executing script ${files[$i]}..."
|
log "executing script ${files[$i]}..."
|
||||||
bash -e <(
|
bash -e <(
|
||||||
if ! command -v orcli &>/dev/null; then
|
echo "shopt -s expand_aliases"
|
||||||
echo "shopt -s expand_aliases"
|
echo "alias orcli=${scriptpath}/orcli"
|
||||||
echo "alias orcli=${scriptpath}/orcli"
|
|
||||||
fi
|
|
||||||
awk 1 "${files[$i]}"
|
awk 1 "${files[$i]}"
|
||||||
)
|
)
|
||||||
done
|
done
|
||||||
|
@ -73,9 +73,7 @@ if [[ ${args[file]} == '-' || ${args[file]} == '"-"' ]]; then
|
|||||||
# case 1: interactive mode if stdin is selected but not present
|
# case 1: interactive mode if stdin is selected but not present
|
||||||
bash --rcfile <(
|
bash --rcfile <(
|
||||||
cat ~/.bashrc
|
cat ~/.bashrc
|
||||||
if ! command -v orcli &>/dev/null; then
|
echo "alias orcli=${scriptpath}/orcli"
|
||||||
echo "alias orcli=${scriptpath}/orcli"
|
|
||||||
fi
|
|
||||||
interactive
|
interactive
|
||||||
) -i </dev/tty
|
) -i </dev/tty
|
||||||
exit
|
exit
|
||||||
@ -85,9 +83,7 @@ if [[ ${args[--interactive]} ]]; then
|
|||||||
# case 2: execute scripts and keep shell running
|
# case 2: execute scripts and keep shell running
|
||||||
bash --rcfile <(
|
bash --rcfile <(
|
||||||
cat ~/.bashrc
|
cat ~/.bashrc
|
||||||
if ! command -v orcli &>/dev/null; then
|
echo "alias orcli=${scriptpath}/orcli"
|
||||||
echo "alias orcli=${scriptpath}/orcli"
|
|
||||||
fi
|
|
||||||
for i in "${!files[@]}"; do
|
for i in "${!files[@]}"; do
|
||||||
log "executing script ${files[$i]}..."
|
log "executing script ${files[$i]}..."
|
||||||
awk 1 "${files[$i]}"
|
awk 1 "${files[$i]}"
|
||||||
@ -99,10 +95,8 @@ else
|
|||||||
for i in "${!files[@]}"; do
|
for i in "${!files[@]}"; do
|
||||||
log "executing script ${files[$i]}..."
|
log "executing script ${files[$i]}..."
|
||||||
bash -e <(
|
bash -e <(
|
||||||
if ! command -v orcli &>/dev/null; then
|
echo "shopt -s expand_aliases"
|
||||||
echo "shopt -s expand_aliases"
|
echo "alias orcli=${scriptpath}/orcli"
|
||||||
echo "alias orcli=${scriptpath}/orcli"
|
|
||||||
fi
|
|
||||||
awk 1 "${files[$i]}"
|
awk 1 "${files[$i]}"
|
||||||
)
|
)
|
||||||
done
|
done
|
||||||
|
@ -54,10 +54,8 @@ results=()
|
|||||||
for i in "${!files[@]}"; do
|
for i in "${!files[@]}"; do
|
||||||
set +e # do not exit on failed tests
|
set +e # do not exit on failed tests
|
||||||
bash -e <(
|
bash -e <(
|
||||||
if ! command -v orcli &>/dev/null; then
|
echo "shopt -s expand_aliases"
|
||||||
echo "shopt -s expand_aliases"
|
echo "alias orcli=${scriptpath}/orcli"
|
||||||
echo "alias orcli=${scriptpath}/orcli"
|
|
||||||
fi
|
|
||||||
awk 1 "${files[$i]}"
|
awk 1 "${files[$i]}"
|
||||||
) &>"$OPENREFINE_TMPDIR/test.log"
|
) &>"$OPENREFINE_TMPDIR/test.log"
|
||||||
results+=(${?})
|
results+=(${?})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user