Skip to content

Change tests.sh for portability#55

Open
slycordinator wants to merge 1 commit intochaudum:mainfrom
slycordinator:shell_script_mod
Open

Change tests.sh for portability#55
slycordinator wants to merge 1 commit intochaudum:mainfrom
slycordinator:shell_script_mod

Conversation

@slycordinator
Copy link

  1. Changed to use /bin/sh instead of /bin/bash

Everything in the script is already posix compliant.

  1. Change to use find -exec rm -rf {} + instead of find | xargs rm -rf

This avoids the edge case of when one of the paths to the subdirectories have spaces or other unusual characters.

An alternative fix for that is to use "find . -name pycache -type d -print0 | xargs -0 rm -rf", but this is a less portable option

1) Changed to use /bin/sh instead of /bin/bash

Everything in the script is already posix compliant.

2) Change to use find -exec rm -rf {} +  instead of find | xargs rm -rf

This avoids the edge case of when one of the paths to the subdirectories have spaces or other unusual characters.

An alternative fix for that is to use "find . -name __pycache__ -type d -print0 | xargs -0 rm -rf", but this is a less portable option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant