Skip to content
Snippets Groups Projects
Commit 96089f6d authored by Daniel P. Berrangé's avatar Daniel P. Berrangé
Browse files

build: don't create temporary files in source dir


There are cases where users do VPATH builds with the source directory being on
a read-only volume. In such a case they have to manually run the command
'git-submodule.sh ...modules...' ahead of time. When checking for status we
should not then write into the source dir.

Tested-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
parent cc84d63a
No related branches found
No related tags found
No related merge requests found
......@@ -39,10 +39,9 @@ fi
case "$command" in
status)
test -f "$substat" || exit 1
trap "rm -f ${substat}.tmp" EXIT
$GIT submodule status $modules > "${substat}.tmp"
test $? -ne 0 && error "failed to query git submodule status"
diff "${substat}" "${substat}.tmp" >/dev/null
CURSTATUS=`$GIT submodule status $modules`
OLDSTATUS=`cat $substat`
test "$CURSTATUS" = "$OLDSTATUS"
exit $?
;;
update)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment