From bccc28a6462712dc325186e7a43bb468f26f289e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 9 Jun 2016 17:51:03 -0400 Subject: librefetch-install: change how the messages look. This looks better with recent pacman/PKGBUILD conventions. --- src/librefetch/librefetch-install.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/librefetch/librefetch-install.in b/src/librefetch/librefetch-install.in index 34815a7..23c1928 100644 --- a/src/librefetch/librefetch-install.in +++ b/src/librefetch/librefetch-install.in @@ -55,18 +55,18 @@ del_line() { post_install() { local file=$1 if grep -q 'librefetch' "$file"; then - msg2 "%s: librefetch is already in %q" "${0##*/}" "$(realpath -s "$file")" + print ":: %s: librefetch is already in %q" "${0##*/}" "$(realpath -s "$file")" local line del=false for line in "${old_code[@]}"; do if has_line "$file" "$line"; then - msg2 "%s: ... but it's an old version" "${0##*/}" + print ":: %s: ... but it's an old version" "${0##*/}" pre_remove "$file" post_install "$file" return $? fi done else - msg2 "%s: adding librefetch to %q" "${0##*/}" "$(realpath -s "$file")" + print ":: %s: adding librefetch to %q" "${0##*/}" "$(realpath -s "$file")" printf '%s\n' "$new_code" >> "$file" fi } @@ -74,7 +74,7 @@ post_install() { # pre_remove $file pre_remove() { local file=$1 - msg2 "%s: removing librefetch from %q" "${0##*/}" "$(realpath -s "$file")" + print ":: %s: removing librefetch from %q" "${0##*/}" "$(realpath -s "$file")" # Check for the old stuff sed -ri 's/^#(.*) # commented out by the libretools post_install script/\1/' "$file" @@ -99,10 +99,10 @@ main() { fi local file=$2 if [[ ! -f "$file" ]]; then - msg2 "%s: does not exist: %q" "${0##*/}" "$(realpath -s "$file")" + error "%s: does not exist: %q" "${0##*/}" "$(realpath -s "$file")" fi if [[ ! -w "$file" ]]; then - msg2 "%s: cannot write to file: %q" "${0##*/}" "$(realpath -s "$file")" + error "%s: cannot write to file: %q" "${0##*/}" "$(realpath -s "$file")" fi case "$1" in install) post_install "$file";; -- cgit v1.1-4-g5e80