summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/librefetch/librefetch-install.in12
1 files 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";;