summaryrefslogtreecommitdiffstats
path: root/generate-tar
diff options
context:
space:
mode:
authorLei YU <mine260309@gmail.com>2020-01-14 11:30:04 +0800
committerLei YU <mine260309@gmail.com>2020-01-20 03:06:08 +0000
commit00d8ade53c7fcea79ec6a71b74d431f2a4a6bf4b (patch)
treebb952fca71c598e820e2805a2b051a349cf24fca /generate-tar
parentfa9a6bec4bbf062f0fd670357fb7ee0731c3f241 (diff)
downloadopenpower-pnor-code-mgmt-00d8ade53c7fcea79ec6a71b74d431f2a4a6bf4b.tar.gz
openpower-pnor-code-mgmt-00d8ade53c7fcea79ec6a71b74d431f2a4a6bf4b.zip
generate-tar: Add --interactive=never for rm
On generating Witherspoon PNOR tarball, rm is asking for confirmation on removing the files in the temp dir, because the partitions are read-only now. Add --interactive=never so that it does not ask for interaction. Tested: Run the script to generate Witherspoon PNOR and verify it does not ask for interfaction to remove the files in temp dir. Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: I89e94e47e02fab53eaca952a70dc672407b75cc7
Diffstat (limited to 'generate-tar')
-rwxr-xr-xgenerate-tar5
1 files changed, 4 insertions, 1 deletions
diff --git a/generate-tar b/generate-tar
index 8b1c6ce35..d948f33e3 100755
--- a/generate-tar
+++ b/generate-tar
@@ -124,7 +124,10 @@ fi
scratch_dir=`mktemp -d`
-trap "{ rm -r ${scratch_dir}; }" EXIT
+# Remove the temp directory on exit.
+# The files in the temp directory may contain read-only files, so add
+# --interactive=never to skip the prompt.
+trap "{ rm -r --interactive=never ${scratch_dir}; }" EXIT
if [[ "${do_sign}" == true ]]; then
if [[ -z "${private_key_path}" ]]; then
OpenPOWER on IntegriCloud