Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
53 lines (50 sloc) 1.002 kB
language: sh
env:
matrix:
- LINT=true
- SHELL=bash
- SHELL=dash
- SHELL=ksh
- SHELL=zsh
matrix:
fast_finish: true
script:
- |
$SHELL --version
if [ "$SHELL" = "zsh" ]; then
cat > $HOME/.zshenv <<END
disable -r end
setopt sh_word_split
END
fi
if ${LINT:-false}; then
shellcheck -s sh bin/shpec # 'sh' refers to POSIX
else
$SHELL bin/shpec
fi
cache: apt
before_install:
- |
get_shellcheck() {
(
for v
do
pkg=shellcheck_${v}_amd64.deb
url="http://ftp.debian.org/debian/pool/main/s/shellcheck/"
wget $url/$pkg || continue
echo $pkg
break
done
)
}
install_shell(){
echo "Install $SHELL"
sudo apt-get update -qq
sudo apt-get install -y $SHELL
}
if ${LINT:-false}; then
pkg=$( get_shellcheck 0.3.5-3 0.3.4-3 )
sudo dpkg -i $pkg
elif ! type $SHELL > /dev/null; then
install_shell
fi
Jump to Line
Something went wrong with that request. Please try again.