configure.sh 564 B

12345678910111213141516171819
  1. #!/bin/bash
  2. commands=('expect' 'ssh' 'scp' 'ftp' 'rsync' 'makepkg' 'make' 'git' 'gcc' 'g++');
  3. installed(){
  4. echo -n -e "Checking for $1...";
  5. command -v $1 >/dev/null 2>&1 || {
  6. echo -e "\e[31;01mnot installed\e[0m"; >&2;
  7. echo "Please install rsync to continue.";
  8. exit 1;
  9. };
  10. echo -e "\e[32;01minstalled\e[0m";
  11. }
  12. # Check to see if all necessary commands exist
  13. for command in "${commands[@]}"; do
  14. installed $command;
  15. done;
  16. echo "Check done, entering install shell.";
  17. echo -n "Available install commands: ";
  18. ls $(dirname $BASH_SOURCE)/bin/;
  19. bin/install-shell;