visualizations.sh: use cp;rm instead of mv in /tmp
mktemp creates a file with mode 0600 and group wheel (inherited from /tmp/). The command mv is then not able to set group ownership to wheel in /var/db/builder-web/ on FreeBSD and emits a warning. Furthermore, the restrictive permissions are preserved. Copying and then removing the temporary file avoids these issues.
This commit is contained in:
parent
ac8c31f2ac
commit
aa1af6c2bd
1 changed files with 4 additions and 2 deletions
|
@ -155,7 +155,8 @@ if [ -e "${DEPENDENCIES_VIZ_FILENAME}" ]; then
|
|||
info "Dependency visualization already exists: '${DEPENDENCIES_VIZ_FILENAME}'"
|
||||
else
|
||||
if ${OPAM_GRAPH} --output-format=html "${OPAM_SWITCH}" > "${TMPDEPENDENCIES}"; then
|
||||
mv "${TMPDEPENDENCIES}" "${DEPENDENCIES_VIZ_FILENAME}"
|
||||
cp "${TMPDEPENDENCIES}" "${DEPENDENCIES_VIZ_FILENAME}"
|
||||
rm "$TMPDEPENDENCIES"
|
||||
else
|
||||
die "opam-graph failed to generate visualization"
|
||||
fi
|
||||
|
@ -201,7 +202,8 @@ if [ -n "${DEBUG_BIN_RELATIVE}" ]; then
|
|||
"${DEBUG_BIN}" \
|
||||
> "${TMPTREE}"
|
||||
then
|
||||
mv "${TMPTREE}" "${TREEMAP_VIZ_FILENAME}"
|
||||
cp "${TMPTREE}" "${TREEMAP_VIZ_FILENAME}"
|
||||
rm "$TMPTREE"
|
||||
else
|
||||
die "modulectomy failed to generate visualization"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue