3 . patchfns >/dev/null || . /usr/lib/patch-scripts/patchfns >/dev/null || { \
4 echo "Impossible to find my library 'patchfns'."
5 echo "Check your install, or go to the right directory"
11 echo "export_patch: export the patches listed in ./series" 1>&2
12 echo "usage: export_patch destination-directory [prefix] " 1>&2
24 if [ -e "$DIR" -a ! -d "$DIR" ]
26 echo "$DIR exists already, but is not a directory." 1>&2
32 echo "./series is not readable." 1>&2
36 mkdir -p "$DIR" || exit 1
39 for x in `cat ./series`
41 fname=`echo "$count" "$PREFIX" "$x" |\
42 awk '{ if ( $2 != "_" )
43 printf("p%05d_%s%s\n", $1, $2, $3);
45 printf("p%05d_%s\n", $1, $3);
47 if [ ! -r $P/patches/"$x" ]
49 echo "$P/patches/"$x" is not readable. skipping." 1>&2
52 cp -f $P/patches/"$x" "$DIR"/"$fname" || continue;
53 count=`expr $count + 1`