[pacman-dev] [PATCH] [paccache] Fix printing of paths
Dave Reisner
d at falconindy.com
Mon Jan 21 09:13:17 EST 2013
On Mon, Jan 21, 2013 at 03:12:40AM -0600, William Giokas wrote:
> Originally printed a leading \ before all path names as the `' would be
> removed during the make. Using '' should be just as good as using `'.
>
> paccache.sh.in:
> die "cachedir \`%s' does not exist or is not a directory" "$cachedir"
>
> paccache
> die "cachedir \%s does not exist or is not a directory" "$cachedir"
>
> Signed-off-by: William Giokas <1007380 at gmail.com>
> ---
Ack -- m4 causes this, sadly. I broke this in 71fcb69028.
> contrib/paccache.sh.in | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/contrib/paccache.sh.in b/contrib/paccache.sh.in
> index 15b7dff..dfac1cb 100644
> --- a/contrib/paccache.sh.in
> +++ b/contrib/paccache.sh.in
> @@ -132,7 +132,7 @@ summarize() {
> if (( delete )); then
> printf -v output 'finished: %d packages removed' "$filecount"
> elif (( move )); then
> - printf -v output "finished: %d packages moved to \`%s'" "$filecount" "$movedir"
> + printf -v output "finished: %d packages moved to '%s'" "$filecount" "$movedir"
> elif (( dryrun )); then
> if (( verbose )); then
> msg "Candidate packages:"
> @@ -266,10 +266,10 @@ case $(( dryrun+delete+move )) in
> esac
>
> [[ -d $cachedir ]] ||
> - die "cachedir \`%s' does not exist or is not a directory" "$cachedir"
> + die "cachedir '%s' does not exist or is not a directory" "$cachedir"
>
> [[ $movedir && ! -d $movedir ]] &&
> - die "move-to directory \`%s' does not exist or is not a directory" "$movedir"
> + die "move-to directory '%s' does not exist or is not a directory" "$movedir"
>
> if (( move || delete )); then
> # make it an absolute path since we're about to chdir
> @@ -278,7 +278,7 @@ if (( move || delete )); then
> fi
>
> # unlikely that this will fail, but better make sure
> -cd "$cachedir" >/dev/null || die "failed to chdir to \`%s'" "$cachedir"
> +cd "$cachedir" >/dev/null || die "failed to chdir to '%s'" "$cachedir"
>
> # note that these results are returned in an arbitrary order from awk, but
> # they'll be resorted (in summarize) iff we have a verbosity level set.
> --
> 1.8.1.1.250.geacf011
>
>
More information about the pacman-dev
mailing list