Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function to compile all script files into a single script file #5

Open
HenrikBengtsson opened this issue Dec 19, 2017 · 0 comments

Comments

@HenrikBengtsson
Copy link
Owner

Add a function startup_compile() to compile all script files into a single script file where the directory and file name filters are translated into if statements. For example, the content of file ~/.bashrc.d/interactive=true/USER!=alice%OR%bob/hello,PAPERSIZE=a4.sh should be injected with the following if statement/wrapper:

## Tags: interactive=true, USER!=alice%OR%bob, PAPERSIZE=a4
if [[ -n "$PS1" && "$USER" != "alice" && "$USER" != "bob" && "$PAPERSIZE" == "a4" ]]; then
  [... file content here ...]
fi

Compiling into a single file may make the overall processing time to go down because fewer files are accessed. It may also help troubleshooting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant