ctf-tools/wcc/install
Steven Van Acker 7144e756e5 fail hard on any error + verify that all scripts use bash -ex to fail
early on any error + anticipate that some tools can't be installed by
now, but we still want the test to return success to satisfy travis-ci
2017-02-16 22:40:17 +01:00

20 lines
459 B
Bash
Executable file

#!/bin/bash -ex
git clone --depth 1 https://github.com/endrazine/wcc
pushd wcc
git submodule init
git submodule update
# fedora doesn't have stropts.h since apparently it's unsupported on linux
# anyway. wcc compiles fines without it.
if [[ "$DISTRI" == "fedora" ]]; then
sed -i "s&#include <stropts.h>&/*#include <stropts.h>*/&g" \
src/wsh/include/libwitch/wsh.h
fi
make
mv bin/ ../
popd
pushd bin/
sed -i "s&/usr/bin/wsh&$(pwd)/wsh&" ./wcch