Skip to content

Instantly share code, notes, and snippets.

@shiftwavedev
Last active June 15, 2025 15:57
Show Gist options
  • Save shiftwavedev/c756397492824b1cf7228d2ef41e80aa to your computer and use it in GitHub Desktop.
Save shiftwavedev/c756397492824b1cf7228d2ef41e80aa to your computer and use it in GitHub Desktop.

Revisions

  1. shiftwavedev renamed this gist Jun 15, 2025. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. shiftwavedev created this gist Apr 4, 2025.
    40 changes: 40 additions & 0 deletions sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    #!/bin/bash

    BOLD=$(tput bold)
    NORMAL=$(tput sgr0)

    cat << "EOF"
    __ ____ ___ _____
    \ \ /\ / / _` \ \ / / _ \
    \ V V / (_| |\ V / __/
    \_/\_/ \__,_| \_/ \___|
    EOF

    check_version() {
    command -v "$1" >/dev/null 2>&1
    if [ $? -eq 0 ]; then
    echo "${BOLD}$1 version:${NORMAL} $($1 --version | head -n 1)"
    else
    echo "${BOLD}$1 is not installed.${NORMAL}"
    fi
    }

    check_readline_version() {
    if command -v pkg-config >/dev/null 2>&1; then
    if pkg-config --exists readline; then
    echo "${BOLD}readline version:${NORMAL} $(pkg-config --modversion readline)"
    else
    echo "${BOLD}readline is not installed.${NORMAL}"
    fi
    else
    echo "${BOLD}pkg-config not installed, unable to verify readline version.${NORMAL}"
    fi
    }

    check_version make
    check_version valgrind
    check_version clang
    check_version gcc
    check_version g++
    check_readline_version