From b378f3f84c2ac01eee3ce73abd9aa558722b2a6f Mon Sep 17 00:00:00 2001 From: Etienne Trimaille Date: Thu, 16 Jan 2020 14:51:22 +0100 Subject: [PATCH] add information about flip and autopep8 for the prehook script --- scripts/astyle.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/scripts/astyle.sh b/scripts/astyle.sh index 0ae41b59367..6955d987700 100755 --- a/scripts/astyle.sh +++ b/scripts/astyle.sh @@ -52,7 +52,15 @@ if ! type -p flip >/dev/null; then dos2unix -q -k "$2" } else - echo "flip not found" >&2 + echo "flip not found" >&2 + echo "Try:" + if [[ -f /etc/fedora-release ]]; then + echo " dnf install dos2unix"; + elif [[ -f /etc/debian_version ]]; then + echo " apt install flip"; + else + echo " installing flip or dos2unix from your package manager"; + fi flip() { : } @@ -61,6 +69,14 @@ fi if ! type -p autopep8 >/dev/null; then echo "autopep8 not found" >&2 + echo "Try:" + if [[ -f /etc/fedora-release ]]; then + echo " dnf install python3-autopep8"; + elif [[ -f /etc/debian_version ]]; then + echo " apt install python3-autopep8"; + else + echo " installing python3-autopep8 from your package manager"; + fi autopep8() { : }