|
56 | 56 | # * GZ_COMPRESS_PROGRAM: Select pigz to reduce build time |
57 | 57 | # * Default: gzip |
58 | 58 | # * Values: pigz,gzip |
| 59 | +# * UNATTENDED: Don't wait for interactive input from terminal, setting this |
| 60 | +# * value to anything will enable it |
| 61 | +# * Default: unset |
| 62 | +# * Value: y |
59 | 63 | # |
60 | 64 | ############################################################################### |
61 | 65 |
|
@@ -495,6 +499,7 @@ SONIC_BUILD_INSTRUCTION := $(MAKE) \ |
495 | 499 | MDEBUG=$(MDEBUG) \ |
496 | 500 | PASSWORD=$(PASSWORD) \ |
497 | 501 | USERNAME=$(USERNAME) \ |
| 502 | + CHANGE_DEFAULT_PASSWORD=$(CHANGE_DEFAULT_PASSWORD) \ |
498 | 503 | SONIC_BUILD_JOBS=$(SONIC_BUILD_JOBS) \ |
499 | 504 | SONIC_USE_DOCKER_BUILDKIT=$(SONIC_USE_DOCKER_BUILDKIT) \ |
500 | 505 | VS_PREPARE_MEM=$(VS_PREPARE_MEM) \ |
@@ -558,6 +563,7 @@ endif |
558 | 563 |
|
559 | 564 | export MIRROR_URLS |
560 | 565 | export MIRROR_SECURITY_URLS |
| 566 | +export SONIC_VERSION_CONTROL_COMPONENTS |
561 | 567 |
|
562 | 568 | %:: | sonic-build-hooks |
563 | 569 | ifneq ($(filter y, $(MULTIARCH_QEMU_ENVIRON) $(CROSS_BUILD_ENVIRON)),) |
@@ -613,23 +619,28 @@ init : |
613 | 619 |
|
614 | 620 | .ONESHELL : reset |
615 | 621 | reset : |
616 | | - $(Q)echo && echo -n "Warning! All local changes will be lost. Proceed? [y/N]: " |
617 | | - $(Q)read ans && ( |
618 | | - if [ $$ans == y ]; then |
619 | | - echo "Resetting local repository. Please wait..."; |
620 | | - sudo rm -rf fsroot*; |
621 | | - if [ "$(MULTIARCH_QEMU_ENVIRON)" == y ] && [[ "$(CONFIGURED_ARCH)" == "armhf" || "$(CONFIGURED_ARCH)" == "arm64" ]]; then |
622 | | - echo "Stopping march $(CONFIGURED_ARCH) docker" |
623 | | - sudo kill -9 `sudo cat /var/run/march/docker.pid` || true |
624 | | - sudo rm -f /var/run/march/docker.pid || true |
625 | | - fi |
626 | | - git clean -xfdf; |
627 | | - git reset --hard; |
628 | | - git submodule foreach --recursive 'git clean -xfdf || true'; |
629 | | - git submodule foreach --recursive 'git reset --hard || true'; |
630 | | - git submodule foreach --recursive 'git remote update || true'; |
631 | | - git submodule update --init --recursive; |
632 | | - echo "Reset complete!"; |
633 | | - else |
634 | | - echo "Reset aborted"; |
635 | | - fi ) |
| 622 | + $(Q)echo && ( |
| 623 | + if [ -z "$(UNATTENDED)" ]; then |
| 624 | + echo -n "Warning! All local changes will be lost. Proceed? [y/N]: " |
| 625 | + @read ans |
| 626 | + else |
| 627 | + ans=y |
| 628 | + fi |
| 629 | + if [ $$ans == y ]; then |
| 630 | + echo "Resetting local repository. Please wait..."; |
| 631 | + sudo rm -rf fsroot*; |
| 632 | + if [ "$(MULTIARCH_QEMU_ENVIRON)" == y ] && [[ "$(CONFIGURED_ARCH)" == "armhf" || "$(CONFIGURED_ARCH)" == "arm64" ]]; then |
| 633 | + echo "Stopping march $(CONFIGURED_ARCH) docker" |
| 634 | + sudo kill -9 `sudo cat /var/run/march/docker.pid` || true |
| 635 | + sudo rm -f /var/run/march/docker.pid || true |
| 636 | + fi |
| 637 | + git clean -xfdf; |
| 638 | + git reset --hard; |
| 639 | + git submodule foreach --recursive 'git clean -xfdf || true'; |
| 640 | + git submodule foreach --recursive 'git reset --hard || true'; |
| 641 | + git submodule foreach --recursive 'git remote update || true'; |
| 642 | + git submodule update --init --recursive; |
| 643 | + echo "Reset complete!"; |
| 644 | + else |
| 645 | + echo "Reset aborted"; |
| 646 | + fi ) |
0 commit comments