Skip to content

Instantly share code, notes, and snippets.

@Thermi
Created March 22, 2019 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Thermi/286240c960e21f483a395abf421de6e0 to your computer and use it in GitHub Desktop.
Save Thermi/286240c960e21f483a395abf421de6e0 to your computer and use it in GitHub Desktop.
Copy and start script for Supermicro's ipmiview tool. It makes sure you always got the latest version in your home directory.
#! /bin/bash
# check and copy files
IPMIVIEWDIR=/opt/ipmiview
USERDIR="$HOME/.local/share/ipmiview/"
if [ "$IPMIVIEWDIR" -nt "$USERDIR" ]
then
OLDDIR="$(pwd)"
mkdir -p "$USERDIR"/BMCSecurity
cd "$IPMIVIEWDIR"
find . -executable -exec bash -c '
USERDIR="$HOME/.local/share/ipmiview/"
for i
do
install -D "$i" "$USERDIR/$i"
done
' {} +
fi
"$USERDIR/IPMIView20"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment