#!/bin/sh # Read in library functions if ! [ -r @LIB@/patchfns ] then echo "Cannot read library @LIB@/patchfns" >&2 exit 1 fi . @LIB@/patchfns usage() { echo "Usage: inpatch [patchname]" echo " inpatch -f filename" if [ x$1 = x-h ] then cat <&2 fi elif [ $status -ne 0 ] then echo "Could not create file list for patch $patch" >&2 return 1 fi done grep -l -e "^$(quote_re $opt_file)\$" $(pc_file_name $patches) \ | sed -e 's:^\.pc/::' -e 's:/\.pc$::' } if [ -n "$opt_patch" ] then patch=$(stripit "$opt_patch") else patch=$(top_patch) if [ -z "$patch" ] then echo "No patches applied" >&2 exit 1 fi fi if [ -z "$opt_file" ] then if ! is_applied $patch then if ! patch_in_series then echo "Patch $patch not in series file" >&2 else echo "Patch is not applied (no old/new status)" >&2 no_status=1 fi fi for file in $(files_in_patch $patch) do if [ -n "$no_status" -o -s $(backup_file_name $patch $file) ] then echo "$file" else echo "$file (new)" fi done else #if [ -n "$opt_patch" ] #then # scan_patches $(patches_before $opt_patch) | sed -e 's/^/> /' # scan_patches $opt_patch | sed -e 's/^/| /' # scan_patches $(patches_after $opt_patch) | sed -e 's/^/< /' #else # series=$(cat_series) # if [ -n "$series" ] # then # scan_patches $series | sed -e 's/^/< /' # fi #fi series=$(cat_series) if [ -n "$series" ] then scan_patches $series #| sed -e 's/^'"$(quote_re $patch)"'$/\0 (here)/' fi fi