Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 34 lines (24 sloc) 754 Bytes
status_msg () {
echo -e "\033[1m$1\033[0m"
error_msg () {
echo -e "\033[31m$1\033[0m" >&2
tput sgr0
status_msg "Running"
cd `dirname $0`/../discount/
status_msg "Copying important files..."
if head -n 1 config.h | grep -q "^/\*$"; then
# remove generated comments in config.h
sed '1,/^ *\*\/ *$/ { d; }' <config.h >../discount-config/config.h && echo 'config.h'
cp config.h ../discount-config/config.h && echo 'config.h'
error_msg "Can't locate config.h comments!"
error_msg "Check the diff before committing (and fix this script if you can)"
cp mkdio.h ../discount-config/mkdio.h && echo 'mkdio.h'
status_msg "Clean files from working directory..."
git clean -f
status_msg "Done!"
Something went wrong with that request. Please try again.