From: Ardis Lu Date: Sun, 27 Sep 2026 03:58:24 +0000 (-0700) Subject: Add ASCII art to success message X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=5a0240db533da483b714cecbb1522fed180dbf0a;p=git.ardis.lu Add ASCII art to success message --- diff --git a/srv/git/git-shell-commands/no-interactive-login b/srv/git/git-shell-commands/no-interactive-login index 3960294..bfeec05 100644 --- a/srv/git/git-shell-commands/no-interactive-login +++ b/srv/git/git-shell-commands/no-interactive-login @@ -1,4 +1,40 @@ #!/bin/sh -GREEN='\033[32m' +width=48 +C0='\033[91m' # Red +C1='\033[93m' # Yellow +C2='\033[92m' # Green +C3='\033[96m' # Cyan +C4='\033[94m' # Blue +C5='\033[95m' # Magenta RESET='\033[0m' -printf "🎉 ${GREEN}Success!${RESET} Your SSH key works.\n" + +cat <<'EOF' | awk -v c0="$C0" -v c1="$C1" -v c2="$C2" -v c3="$C3" -v c4="$C4" -v c5="$C5" -v rst="$RESET" ' +BEGIN { + colors[0] = c0 + colors[1] = c1 + colors[2] = c2 + colors[3] = c3 + colors[4] = c4 + colors[5] = c5 + n = 0 +} +{ + for (i = 1; i <= length($0); i++) { + c = substr($0, i, 1) + printf "%s%s", colors[n % 6], c + n++ + } + printf "%s\n", rst +}' + _ _ _ _ _ + (_) | | (_) | | + ____ _| |_ ____ ____ __| |_ ___ | |_ _ + / _ | | __| / _ | __/ _ | / __| | | | | | + | (_| | | |_ | (_| | | | (_| | \__ \_| | |_| | + \__ |_|\__(_)____|_| \____|_|___(_)_|\____| + __/ | + |___/ +EOF + +msg="🎉 Success! Your SSH key works." +printf "%$(( (width - ${#msg}) / 2 ))s🎉 ${C2}Success!${RESET} Your SSH key works.\n" ""