deb-install.sh 652 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/sh
  2. die()
  3. {
  4. echo "$*" >&2
  5. exit 1
  6. }
  7. install()
  8. {
  9. for i in "$@"; do
  10. if printf '%s' "$i" | grep -qe dbgsym; then
  11. continue
  12. fi
  13. if ! [ -f "$i" ]; then
  14. echo "Warning: $i does not exist. Skipping..."
  15. continue
  16. fi
  17. echo "Installing $i ..."
  18. dpkg -i "$i" || die "FAILED: dpkg -i $i"
  19. done
  20. }
  21. basedir="$1"
  22. [ -d "$basedir" ] || die "Usage: deb-install.sh PACKAGEDIR"
  23. for interp in python3 cython3 pypy; do
  24. install "$basedir"/$interp-awlsim_*_*.deb
  25. install "$basedir"/$interp-awlsimhw-*_*_*.deb
  26. if [ "$interp" = "python3" ]; then
  27. install "$basedir"/$interp-awlsim-gui_*_*.deb
  28. fi
  29. done
  30. install "$basedir"/awlsim-*_*_*.deb
  31. exit 0