diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2004-07-09 07:26:21 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2004-07-09 07:26:21 +0000 |
commit | e7bb642fdbcfa9bb1d7265781f56d89e398f90b9 (patch) | |
tree | 1ad9d16ce37e504ba72f9315c94ca9eb95597133 /scripts/rpatch.in | |
parent | c871d820f8f00819613068aa77cb00d89e4508af (diff) | |
download | quilt-e7bb642fdbcfa9bb1d7265781f56d89e398f90b9.tar.gz |
- Switch from echo to printf for all translations: This is more
stable than having expansions in messages that might change
independent of the message.
- Add print_patch function and always use it when printing patch
names. Remove -n options from various scripts and use a global
switch QUILT_PATCHES_PREFIX in .quiltrc to decide between patch
names with and without directory prefix. Depending on user
experience this switch may eventually go away.
- Add --diffstat option to refresh command: If given, this option
inserts diffstat statistics at the end of the patch header, or
refreshes the existing diffstat output. No special tags in the
path file (%diffstat or the like) are needed.
- Minor fix inserting changelog into RPM specfile.
Diffstat (limited to 'scripts/rpatch.in')
-rwxr-xr-x | scripts/rpatch.in | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/rpatch.in b/scripts/rpatch.in index bbe988f..3282d1c 100755 --- a/scripts/rpatch.in +++ b/scripts/rpatch.in @@ -19,7 +19,7 @@ fi usage() { - echo $"Usage: $0 [-fRq] patchname" + printf $"Usage: $0 [-fRq] patchname\n" exit 1 } @@ -59,7 +59,7 @@ check_for_pending_changes() if ! rmdir $workdir || # note that this is racey... ! cp -rl $QUILT_PC/$patch $workdir/ then - echo $"Failed to copy files to temporary directory" + printf $"Failed to copy files to temporary directory\n" >&2 rm -rf $workdir return 1 fi @@ -82,7 +82,7 @@ check_for_pending_changes() then if ! [ -e $QUILT_PC/$patch ] then - echo $"Failed to patch temporary files" >&2 + printf $"Failed to patch temporary files\n" >&2 rm -rf $workdir return 1 fi @@ -97,7 +97,8 @@ check_for_pending_changes() if [ -s $remains ] then - echo $"Patch $patch does not remove cleanly (enforce with -f)." + printf $"Patch %s does not remove cleanly (enforce with -f)\n" \ + "$(print_patch $patch)" >&2 status=1 fi rm -f $remains @@ -119,7 +120,7 @@ rpatch() if [ $status -eq 0 ] then - echo $"Removing $patch" + printf $"Removing patch %s\n" "$(print_patch $patch)" rm -f "$QUILT_PC/$patch/.timestamp" @LIB@/backup-files $silent -r -B $QUILT_PC/$patch/ - status=$? @@ -175,7 +176,8 @@ patch=$1 top=$(top_patch) if [ -n "$top" -a -e $QUILT_PC/$top~refresh -a -z "$opt_force" ] then - echo $"The topmost patch $top needs to be refreshed first." + printf $"Patch %s needs to be refreshed first.\n" \ + "$(print_patch $top)" >&2 exit 1 fi |