check for shells
This commit is contained in:
parent
8db241f1c3
commit
5c88db1743
16
urchin
16
urchin
@ -9,11 +9,7 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
DEFAULT_SHELLS='sh
|
DEFAULT_SHELLS='sh bash dash mksh zsh'
|
||||||
bash
|
|
||||||
dash
|
|
||||||
mksh
|
|
||||||
zsh'
|
|
||||||
|
|
||||||
# Make sure that CDPATH isn't set, as it causes `cd` to behave unpredictably -
|
# Make sure that CDPATH isn't set, as it causes `cd` to behave unpredictably -
|
||||||
# notably, it can produce output.
|
# notably, it can produce output.
|
||||||
@ -327,7 +323,7 @@ $USAGE
|
|||||||
By default, Urchin checks for the following shells and runs every
|
By default, Urchin checks for the following shells and runs every
|
||||||
particular test file once per shell.
|
particular test file once per shell.
|
||||||
|
|
||||||
$(echo "$DEFAULT_SHELLS" | sed 's/^/ /')
|
$(echo "$DEFAULT_SHELLS" | sed 's/ /\n /g')
|
||||||
|
|
||||||
On each run,
|
On each run,
|
||||||
|
|
||||||
@ -439,9 +435,13 @@ do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
# If -s was not passed, used the default shells.
|
# If -s was not passed, used the available default shells.
|
||||||
if ! test -f "$shell_list"; then
|
if ! test -f "$shell_list"; then
|
||||||
echo "$DEFAULT_SHELLS" > "$shell_list"
|
for shell in $DEFAULT_SHELLS; do
|
||||||
|
if which $shell > /dev/null; then
|
||||||
|
echo $shell >> "$shell_list"
|
||||||
|
fi
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Verify argument for main stuff
|
# Verify argument for main stuff
|
||||||
|
Loading…
Reference in New Issue
Block a user