patchlist.sh 493 Bytes
Newer Older
1 2
#!/bin/sh --

3
list_patches_PATCHES () {
4
	cat -
5 6 7 8 9 10 11 12 13 14 15 16 17 18
}

list_patches_mq () {
	hg qapplied | sed -e 's/^/mq-/'
}

list_patches () {
	if [ -f .hg/patches/series ]; then
		list_patches_mq
	else
		list_patches_PATCHES
	fi
}

19
cat <<EOF
20 21 22
/* this is an autogenerated file.  edit patchlist.sh instead. */
#include "config.h"

23 24 25 26 27 28 29 30 31
#include <stdio.h>
#include <stdlib.h>

#include "mutt.h"

void mutt_print_patchlist (void)
{
EOF

32
list_patches | while read patch ; do
33 34 35 36
	echo "  puts (\"${patch}\");"
done

echo "}"