From 839152facd94ba032f6b5e6197236068f1b311ed Mon Sep 17 00:00:00 2001 From: Russell Riker Date: Tue, 6 Sep 2022 15:22:59 -0400 Subject: [PATCH] Read apps from a file and loop over them Reads the apps to be installed my-apps.txt and installed. Checks first if there is a my-apps.txt file. Need to make a better exit if there isn't --- my-apt-apts.sh | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/my-apt-apts.sh b/my-apt-apts.sh index d517e36..8680509 100755 --- a/my-apt-apts.sh +++ b/my-apt-apts.sh @@ -1,5 +1,6 @@ #!/usr/bin/bash + ########################################################################## # # ____ ___ __ __ ____ _____ / /_ ____ _____ ____ _____ @@ -14,11 +15,22 @@ # check if I'm logged on to the tilde.team, if so. Dont run this stuff if [ $HOSTNAME != 'tilde' ]; then - sudo apt install curl - sudo apt install lolcat - sudo apt install figlet - sudo apt install lynx - sudo apt install cowsay -fi + # Can I check for a a file of apps, and if it's there, read it into $APPS? + if [ -f ~/mydev/my-dotfiles/my-apps.txt ]; then + while read APPS + do + echo "\n******************************************\n Installing: $APPS" + sudo apt install $APPS + done < my-apps.txt + fi # End If apps file lookup + +# for APPS in curl lolcat figlet cowsay lynx +# do +# sudo apt install $APPS +# echo "Intalling $APPS" +# echo " " +# done + +fi # endif HOSTNAME