mock-shell.sh 385 B

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. arch=$1
  3. shift
  4. if [ -z "$arch" ]; then
  5. echo "$0 ARCH [-- command]"
  6. echo "Specify if 32 or 64 arch and an optional command to run in the shell"
  7. exit 1
  8. fi
  9. if [ -r ./mock-config.txt ]; then
  10. . ./mock-config.txt
  11. else
  12. echo "Missig mock-config.txt"
  13. exit 1
  14. fi
  15. if [ $arch = "32" ]; then
  16. ROOT=$ROOT32
  17. else
  18. ROOT=$ROOT64
  19. fi
  20. mock -r $ROOT --unpriv --shell $*