#!/bin/bash

#requires xsel and inxi to work

#setup

main(){

    #check for existing of inxi

    command -v inxi  >/dev/null  2>/dev/null || quit_error $"Please ensure inxi and xsel are installed"

    run_report

    quit

}

run_report(){

    bash -c '( echo "[code]"; inxi -Fxrz  -c0 ; echo "[/code]" 2>/dev/null ) | xsel -ib 2>/dev/null &'
    echo
    bash -c 'inxi -Fxrz 2>/dev/null'
    echo
    echo $"Information copied to clipboard - please paste as required"

}

quit(){
    echo
    read -n 1 -s -r -p $"Press any key to continue"
    exit 0
}

main "$@"
