From 67e379966c657eccb3086508fa9bff38b831fbde Mon Sep 17 00:00:00 2001 From: Nic Gaffney Date: Fri, 23 Feb 2024 02:36:36 -0600 Subject: Updated configure.sh to check for dependencies --- configure.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'configure.sh') diff --git a/configure.sh b/configure.sh index e50d57c..db180cb 100755 --- a/configure.sh +++ b/configure.sh @@ -1,3 +1,17 @@ +exists () { + if ! command -v &> /dev/null + then + echo "$1 not found. Please install it!" + exit 1 + fi +} + +deps=("make","tar","xz","curl","gcc","texinfo","gmp","mpfr","libmpc","nasm","xorriso","mtools") +for dep in $deps +do + exists dep +done + mkdir -p $HOME/.local/opt mkdir -p $HOME/.local/opt/cross mkdir -p $HOME/.local/src @@ -33,5 +47,6 @@ make install-target-libgcc export PATH="$HOME/.local/opt/cross/bin:$PATH" -echo "CONFIGURATION COMPLETE! Please add the following line to your .bashrc, .zshrc, or whatever you use." -echo "export PATH=\$HOME/.local/opt/cross/bin:\$PATH" +echo """ +CONFIGURATION COMPLETE! Please add the following line to your .bashrc, .zshrc, or whatever you use. +export PATH=\$HOME/.local/opt/cross/bin:\$PATH""" -- cgit v1.2.3