diff --git a/update_all_submodules b/update_all_submodules index 41f6679..d0bf837 100755 --- a/update_all_submodules +++ b/update_all_submodules @@ -1,5 +1,13 @@ #!/bin/bash +if [[ -e /var/lock/update-tde-git-submodules ]]; then + echo "TDE GIT submodules are currently being updated" + echo "If this is not the case, please remove the lockfile /var/lock/update-tde-git-submodules" + exit 0 +fi + +touch /var/lock/update-tde-git-submodules + PARENTDIR=$PWD echo "Working in $PARENTDIR" if [[ ! -d .git ]]; then @@ -40,3 +48,8 @@ do fi done exec 3>&- + +# Let the disk subsystem recover +sleep 60 + +rm /var/lock/update-tde-git-submodules