[pacman-dev] [PATCH 1/4] pacdiff: color filename and mention what we found
Florian Pritz
bluewind at xinu.at
Wed Dec 19 17:33:48 EST 2012
Signed-off-by: Florian Pritz <bluewind at xinu.at>
---
contrib/pacdiff.sh.in | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/contrib/pacdiff.sh.in b/contrib/pacdiff.sh.in
index bfafda2..5797fef 100644
--- a/contrib/pacdiff.sh.in
+++ b/contrib/pacdiff.sh.in
@@ -62,7 +62,15 @@ fi
# see http://mywiki.wooledge.org/BashFAQ/020
while IFS= read -u 3 -r -d '' pacfile; do
file="${pacfile%.pac*}"
- echo "File: $file"
+ file_type="pac${pacfile##*.pac}"
+
+ case "$file_type" in
+ pacnew) printf "\e[0;32m%s\e[0m" "$file_type";;
+ pacorig) printf "\e[0;33m%s\e[0m" "$file_type";;
+ pacsave) printf "\e[0;34m%s\e[0m" "$file_type";;
+ esac
+
+ printf " found for \e[0;35m%s\e[0m\n" "$file"
if [ ! -f "$file" ]; then
echo " $file does not exist"
rm -i "$pacfile"
--
1.8.0.2
More information about the pacman-dev
mailing list