]> git.ardis.lu - git.ardis.lu/commitdiff
Add ASCII art to success message main
authorArdis Lu <ardisglu@gmail.com>
Sun, 27 Sep 2026 03:58:24 +0000 (20:58 -0700)
committerArdis Lu <ardisglu@gmail.com>
Sun, 27 Sep 2026 03:58:24 +0000 (20:58 -0700)
srv/git/git-shell-commands/no-interactive-login

index 3960294c06b72baf6a7f442ff4cd619c4cdd7c06..bfeec056c380803e19193501d511dae4b09fca10 100644 (file)
@@ -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" ""
This page took 0.041502 seconds and 4 git commands to generate.