build: add an env var to run make reset unattended (#13820)
- previously "make reset" was expecting user input from the terminal to do its job - setting UNATTENDED to any non-zero string will allow "make reset" to run without interactive confirmation Signed-off-by: Mathieu Launay <m.launay@criteo.com>
This commit is contained in:
parent
35a4410f86
commit
bda91a19e3
@ -44,6 +44,16 @@
|
||||
# * ENABLE_AUTO_TECH_SUPPORT: Enable the configuration for event-driven techsupport & coredump mgmt feature
|
||||
# * Default: y
|
||||
# * Values: y,n
|
||||
# * INCLUDE_BOOTCHART: Install SONiC bootchart
|
||||
# * Default: y
|
||||
# * Values: y,n
|
||||
# * ENABLE_BOOTCHART: Enable SONiC bootchart
|
||||
# * Default: n
|
||||
# * Values: y,n
|
||||
# * UNATTENDED: Don't wait for interactive input from terminal, setting this
|
||||
# * value to anything will enable it
|
||||
# * Default: unset
|
||||
# * Value: y
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
@ -482,8 +492,13 @@ init :
|
||||
|
||||
.ONESHELL : reset
|
||||
reset :
|
||||
@echo && echo -n "Warning! All local changes will be lost. Proceed? [y/N]: "
|
||||
@read ans && (
|
||||
@echo && (
|
||||
if [ -z "$(UNATTENDED)" ]; then
|
||||
echo -n "Warning! All local changes will be lost. Proceed? [y/N]: "
|
||||
@read ans
|
||||
else
|
||||
ans=y
|
||||
fi
|
||||
if [ $$ans == y ]; then
|
||||
echo "Resetting local repository. Please wait...";
|
||||
sudo rm -rf fsroot*;
|
||||
|
Reference in New Issue
Block a user