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 "usage: import_patch [ -p prefix-pattern ] patchfile [...]" 1>&2
28 if [ ! -e applied-patches ]
33 mkdir -p patches || exit 1
34 mkdir -p txt || exit 1
42 echo "Cannot create ./series" 1>&2
49 echo "./series is not writable." 1>&2
53 PATTERN='s/^'"$XPATTERN"'//'
58 echo "$x does not exist, skipping." 1>&2
61 patchname=`basename $x .bz2`
62 patchname=`basename $patchname .gz`
63 patchname=`basename $patchname .Z`
64 patchname=`basename $patchname .patch`
65 if is_applied $patchname
67 echo $patchname is currently applied
70 if [ "$XPATTERN" != "" ]
72 patchname=`echo $patchname | sed -e "$PATTERN"`
74 pname=$P/patches/"$patchname".patch
77 echo "$pname exists already, skipping." 1>&2
82 bunzip2 < "$x" > "$pname"
85 gunzip < "$x" > "$pname"
87 *.Z) zcat < "$z" > "$pname"
90 cat "$x" > "$pname" || continue
93 echo "$patchname".patch >> series
95 extract_description < "$pname" >$P/txt/"$patchname".txt
96 grep '^[(]undescribed patch[)]$' < $P/txt/"$patchname".txt > /dev/null
99 echo "Warning: $patchname has no description." 1>&2