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 # if patch -R -p1 -s -i $P/patches/"$1".patch
15 # echo SOMETHING WENT WRONG
22 FILES=$(cat $P/pc/$1.pc)
23 for file in $FILES ; do
25 if [ -L "$file"~"orig" ]; then
26 if [ `readlink "$file"~"orig"` = "$base_dir/""$file"~"$1" ]; then
30 if [ -f "$file"~"$1" ]; then
31 mv -f "$file"~"$1" "$file"
41 FILES=$(cat $P/pc/$1.pc)
50 echo "Usage: rpatch patchname"
59 PATCH_NAME=$(stripit $1)
62 if is_applied "$PATCH_NAME"
64 # if can_remove "$PATCH_NAME"
66 if [ ! -f $P/pc/$PATCH_NAME.pc ]; then
69 do_remove "$PATCH_NAME"
70 kill_old_ones "$PATCH_NAME"
71 remove_from_db "$PATCH_NAME"
73 # echo "$PATCH_NAME" does not remove cleanly
77 echo "$PATCH_NAME" is not applied
84 msg="no patches applied"
89 echo Removed $PATCH_NAME, $msg