#!/bin/bash shellfu import pretty # # dist.sh module to query lsb_release command # _distp_lsb__get() { # # Get field from lsb_release # local key=$1 case $key in id) lsb_release -si | tr '[:upper:]' '[:lower:]' ;; description) lsb_release -sd ;; name) lsb_release -si ;; ver) lsb_release -sr ;; ver.x) lsb_release -sr | cut -d. -f1 ;; ver.y) lsb_release -sr | cut -d. -f2 ;; ver.z) : ;; codename) lsb_release -sc ;; "") mkusage -E KEY ;; *) return 1 ;; esac return 0 } _distp_lsb__sfpi_compat() { # # True if this plugin should work here # command -v lsb_release >/dev/null } #shellfu module-version=__MKIT_PROJ_VERSION__