ctf-tools/wcc/install
2017-01-12 11:15:20 +01:00

20 lines
458 B
Bash
Executable file

#!/bin/bash -e
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