Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 18 lines (13 sloc) 413 Bytes
#!/bin/bash
PREFIX=/usr/local
XOSD=$(locate -b libxosd.so | grep --color=never libxosd.so$ | head -n 1)
for arg in $@ ; do
case "$arg" in
--prefix*)
PREFIX=$(echo $arg | cut -d= -f2)
;;
esac
done
PREFIX=$(echo $PREFIX | sed -e 's/\//\\\//g')
XOSD=$(echo $XOSD | sed -e 's/\//\\\//g')
cat Makefile.in | sed -e "s/@PREFIX@/$PREFIX/" | sed -e "s/@XOSD@/$XOSD/" > Makefile