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

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions setup/pi/setup-teslausb
Original file line number Diff line number Diff line change
Expand Up @@ -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.

cat << TESLAUSB_TIP1
Run 'bin/setup-teslausb upgrade' to update to the latest version of teslausb,
or run 'bin/remountfs_rw' to allow writing to the root partition.

TESLAUSB_TIP1
fi
EOC
fi

Expand All @@ -932,10 +934,12 @@ then
if ! grep -q TESLAUSB_TIP1 "/home/$DEFUSER/.bashrc"
then
cat >> "/home/$DEFUSER/.bashrc" <<- EOC
if [ -n "\$PS1" ]; then
cat << TESLAUSB_TIP1
Run 'sudo -i' if you need to make changes.

TESLAUSB_TIP1
fi
EOC
fi
fi
Expand Down