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

Suppress UX courtesy reminders on non-interactive shells #804

Conversation

tomrund
Copy link

@tomrund tomrund commented Dec 20, 2023

I was having issues SCPing and rsyncing to TeslaUSB from another machine due to the UX courtesy reminders. I found these changes suppress the messages in non-interactive shells, resolving the issue.

@@ -918,11 +918,13 @@ sed -i '/source \/root\/bin\/setup-teslausb/d' /root/.bashrc
if ! grep -q TESLAUSB_TIP1 /root/.bashrc
then
cat >> /root/.bashrc <<- EOC
if [ -n "\$PS1" ]; then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line and the closing fi below should be tab-indented.
(see man bash for how the <<- redirection operator works)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, thank you. I replaced the space indents with tabs, and also improved other indentation after reading the docs.

…X courtesy reminders from non-interactive shells

TESLAUSB_TIP1
if [ -n "\$PS1" ]
then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this back to if [ ...] ; then, like it is below on line 938?
While the TeslaUSB scripts use the if-on-the-next-line style, this if is written to .bashrc, which uses the if-on-the-same-line style.

…-teslausb meant to suppress UX courtesy reminders from non-interactive shells
@marcone marcone merged commit 2b0bab7 into marcone:main-dev Dec 24, 2023
1 check passed
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.

2 participants