diff options
| author | Nic Gaffney <gaffney_nic@protonmail.com> | 2024-02-23 02:36:36 -0600 |
|---|---|---|
| committer | Nic Gaffney <gaffney_nic@protonmail.com> | 2024-02-23 02:36:36 -0600 |
| commit | 67e379966c657eccb3086508fa9bff38b831fbde (patch) | |
| tree | 636ecf4cef3e4187a3054e28df7095f93b39fc0a /configure.sh | |
| parent | f8e7cb9034dac5e9834cd385251a57fb853d8998 (diff) | |
| download | gftos-67e379966c657eccb3086508fa9bff38b831fbde.tar.gz | |
Updated configure.sh to check for dependencies
Diffstat (limited to 'configure.sh')
| -rwxr-xr-x | configure.sh | 19 |
1 files changed, 17 insertions, 2 deletions
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""" |
