Judge orders accused Texas base gunman to shave or be shaved