ctf-tools/wcc/install

21 lines
459 B
Text
Raw Normal View History

#!/bin/bash -ex
2016-08-13 14:22:58 +00:00
git clone --depth 1 https://github.com/endrazine/wcc
pushd wcc
git submodule init
git submodule update
2016-11-11 09:39:06 +00:00
# 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
2016-08-13 14:22:58 +00:00
make
mv bin/ ../
popd
pushd bin/
sed -i "s&/usr/bin/wsh&$(pwd)/wsh&" ./wcch