Advertisement
kylemsguy

Install all the packages in a folder...

Jun 8th, 2013
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.39 KB | None | 0 0
  1. #!/bin/bash
  2. # I hope this works...
  3. # Check if root
  4. if [[ $EUID -ne 0 ]]; then
  5.    echo "This script must be run as root" 1>&2
  6.    exit 1
  7. fi
  8.  
  9. # Check architecture
  10. ARCH=`uname -p`
  11.  
  12. # do whatevers
  13. if [ "$ARCH" == "x86_64" ]
  14. then
  15.     pushd amd64
  16.                
  17. elif [ "$ARCH" == "i686" ]
  18. then
  19.     pushd i686
  20.  
  21. else
  22.     echo "Invalid architecture"
  23.     exit 1
  24. fi
  25.  
  26. for i in *
  27. do
  28.     dpkg -i $i
  29. done
  30. popd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement