#!/bin/sh -e

c99 -shared linenoise.c -o liblinenoise.so

mkdir -p "$1/usr/lib/" "$1/usr/include/"
mv liblinenoise.so "$1/usr/lib/"
mv linenoise.h "$1/usr/include/"
chmod 0755 "$1/usr/lib/liblinenoise.so"
chmod 0644 "$1/usr/include/linenoise.h"
