Advertisement
To-Slalom

multiple instalations offline

Sep 27th, 2021 (edited)
1,572
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.58 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #########################################################
  4. # basic script to install multiple apps using pkg       #
  5. # Antono Pires - 10/9/2021                              #
  6. #########################################################
  7.  
  8. #########################################################
  9. # lets check if we have the app(s) install in our OS    #
  10. #########################################################
  11. list=( pkg )
  12. for i in "${list[@]}" ; do
  13.     if ! command -v $i &> /dev/null ; then
  14.         echo "$i isnt install yet"
  15.         exit
  16.     fi
  17. done
  18. #########################################################
  19. # lest check if OS is 32or 64 bits                      #
  20. #########################################################
  21. CheckOs=`uname -i`
  22. if [ ${CheckOs} == "i686" ] ; then OS=i386 ; else OS=amd64 ; fi
  23. #########################################################
  24. # let find all debs in all folders and subfolders       #
  25. #########################################################
  26. find_debs=$(find "." -type f | egrep -i "\.(deb)$" | sort )
  27. #########################################################
  28. # let check is var find_debs is empty or not            #
  29. #########################################################
  30. if [[ -z "${find_debs}" ]] ; then
  31.     echo " dint found nuthing to install "
  32. else
  33.     # now let loop then all and install them
  34.     for deb in ${find_debs} ; do
  35.         # echo " esta var ${deb} "
  36.         pkg i ${deb}
  37.     done
  38.     # now we are going to refresh in order see change
  39.     # fixmenus     # fix menus
  40.     # jwm -restart # restart jwm
  41. fi
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement