?? files.in
字號:
#! @BASH@# This script is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License version 2 as# published by the Free Software Foundation.## See the COPYING and AUTHORS files for more details.# Read in library functionsif [ "$(type -t patch_file_name)" != function ]then if ! [ -r $QUILT_DIR/scripts/patchfns ] then echo "Cannot read library $QUILT_DIR/scripts/patchfns" >&2 exit 1 fi . $QUILT_DIR/scripts/patchfnsfiusage(){ printf $"Usage: quilt files [-v] [-a] [-l] [--combine patch] [patch]\n" if [ x$1 = x-h ] then printf $"Print the list of files that the topmost or specified patch changes.-a List all files in all applied patches.-l Add patch name to output.-v Verbose, more user friendly output.--combine patch Create a listing for all patches between this patch and the topmost or specified patch. A patch name of \`-' is equivalent to specifying the first applied patch." exit 0 else exit 1 fi}options=`getopt -o vhal --long combine: -- "$@"`if [ $? -ne 0 ]then usagefieval set -- "$options"while truedo case "$1" in -v) opt_verbose=1 shift ;; -a) opt_all=1 shift ;; -l) opt_labels=1 shift ;; -h) usage -h ;; --combine) opt_all=1 if [ "$2" = - ] then : else first_patch=$(find_patch_in_series "$2") || exit 1 fi shift 2 ;; --) shift break ;; esacdoneif [ $# -gt 1 ]then usagefilast_patch=$(find_applied_patch "$1") || exit 1if [ -n "$opt_all" -a -z "$first_patch" ]then first_patch=$(applied_patches | head -n 1)fiif [ -n "$opt_all" ]then set -- $(patches_before $last_patch) $last_patch while [ $# -ge 1 -a "$1" != "$first_patch" ] do shift done if [ $# -eq 0 ] then printf $"Patch %s not applied before patch %s\n" \ "$(print_patch $first_patch)" \ "$(print_patch $last_patch)" >&2 exit 1 fi patches=( $@ )else patches=( $last_patch )filist_files_in_patch(){ local patch=$1 local status if [ -n "$opt_all" ] && [ -n "$opt_verbose" ] && [ -z "$opt_labels" ] then echo "$patch" fi if [ -n "$opt_verbose" ] && [ -z "$opt_labels" ] then use_status=yes fi # Note: If opt_labels is set, then use_status is not set. for file in $(files_in_patch $patch | sort) do if [ -n "$opt_labels" ] then if [ -n "$opt_verbose" ] then echo -n "[$patch] " else echo -n "$patch " fi fi if [ -z "$use_status" ] then echo "$file" else status=" " if [ -s $(backup_file_name $patch $file) ] then if ! [ -s $file ] then status="-" fi else if [ -s $file ] then status="+" fi fi echo "$status $file" fi done}for patch in ${patches[@]}do list_files_in_patch $patchdone### Local Variables:### mode: shell-script### End:# vim:filetype=sh
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -