Skip to content

Instantly share code, notes, and snippets.

@andrewpsp
Created February 12, 2024 15: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 andrewpsp/d552390a5be15b5585b18d43113ee427 to your computer and use it in GitHub Desktop.
Save andrewpsp/d552390a5be15b5585b18d43113ee427 to your computer and use it in GitHub Desktop.
HL7 Management tools
function main {
clear;
if [[ "$(uname)" == "Darwin" ]]; then
echo "Sorry this is not a linux machine - it's Mac OS computer.";
echo "See: https://interfaceware.atlassian.net/wiki/x/RYDan";
echo "For step by step instructions on how to get a linux machine.";
return;
fi
if [[ -e iguana ]]; then
echo "The file 'iguana' already exists.";
echo "Either remove it (rm iguana), rename (mv iguana iguana_old) it or do this install";
echo "in another place.";
return;
fi;
# Check for wget or curl
if which wget > /dev/null 2>&1; then
WFETCH="wget -q -O ";
elif which curl > /dev/null 2>&1; then
WFETCH="curl -s -o ";
else
echo "Neither wget nor curl is available.";
echo "Please install them.";
return;
fi;
G=2.32;
# Determine architecture and download
if [[ $(uname -m) =~ ^(arm|aarch) ]]; then
printf "Downloading ARM binary...";
$WFETCH iguana https://downloads.interfaceware.com/downloads/10.1.91/linux/iguana-Arm;
G=2.32;
echo "";
else
printf "Downloading Intel binary...";
$WFETCH iguana https://downloads.interfaceware.com/downloads/10.1.91/linux/iguana;
G=2.26;
echo "";
fi;
chmod +x iguana;
Y=$(ldd --version | head -n 1 | awk '{print $NF}');
Y_int=${Y//./};
G_int=${G//./};
if [ "$Y_int" -lt "$G_int" ]; then
printf "Your current version of GLIBC is $Y, which is below the required ";
echo $G;
echo -e "PLEASE READ: https://interfaceware.atlassian.net/wiki/spaces/IXB/pages/2631434293/";
return;
fi;
echo "NEXT STEP to install Iguana is to copy, paste and run the following command:";
echo " sudo ./iguana --service install";
}
main;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment