UnconnectedBedna / shrink-backup

A utility to backup SBC:s (like Raspberry pi) into minimal bootable img files
Other
48 stars 7 forks source link

Fix to check if the script is running in an interactive terminal #35

Closed iliajie closed 5 months ago

iliajie commented 5 months ago

This PR fixes a bug as discussed in this thread.

UnconnectedBedna commented 5 months ago

The problem is that it actually goes into the variable $output that gets filtered before first going into the log via the debug function.

I am actually working on it right now, and just succeeded by using /dev/null.

Downside is that the feedback is VERY limited, like, the user will only see "## Creating bootsector..." and "## Backing up files..." for minutes (depending on how long the backup takes), risking the user thinks the script froze while in reality it is doing dd and rsync..

UnconnectedBedna commented 5 months ago

I'll implement something similar on the testing branch. Thank you for your contribution. :heart:

iliajie commented 5 months ago

I'll implement something similar on the testing branch.

Excellent!

Thank you for your contribution.

You're welcome.