]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/BuildEnv: override "set -C" (noclobber) in sourcing shell env
authorLaszlo Ersek <lersek@redhat.com>
Sun, 8 Jul 2012 09:55:50 +0000 (11:55 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 18 Oct 2017 09:34:03 +0000 (11:34 +0200)
The BuildEnv utility is sourced (executed by the user's interactive shell)
when the user sets up the build session. Some users like to set -C
(noclobber) for some additional safety in their shells, which trips up
BuildEnv. Update the redirection operator so that it overrides noclobber.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Thomas Huth <thuth@redhat.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
BaseTools/BuildEnv

index f74881111c8e56f0e476a62ca7cfdb0479cff2e3..ff0c5115a5e18a074705bbd58c273ab2dd98066b 100755 (executable)
@@ -90,7 +90,7 @@ StoreCurrentConfiguration() {
   #
   OUTPUT_FILE=$CONF_PATH/BuildEnv.sh
   #echo Storing current configuration into $OUTPUT_FILE
-  echo "# Auto-generated by ${BASH_SOURCE[0]}" > $OUTPUT_FILE
+  echo "# Auto-generated by ${BASH_SOURCE[0]}" >| $OUTPUT_FILE
   GenerateShellCodeToSetVariable WORKSPACE $OUTPUT_FILE
   GenerateShellCodeToSetVariable EDK_TOOLS_PATH $OUTPUT_FILE
   GenerateShellCodeToUpdatePath $OUTPUT_FILE