From 0e5ef23e167b251c2e9c15af83a1759fc60f619e Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sun, 9 Jul 2023 13:39:45 +0200 Subject: [PATCH] Run all sudo commands at once --- deploy.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/deploy.sh b/deploy.sh index a3eafe7..6520850 100755 --- a/deploy.sh +++ b/deploy.sh @@ -120,10 +120,7 @@ else sudo wimdelete --soft "$wimFile" 2; done; - sudo umount -vf "$mountPath"; - sudo umount -vf "$bootPath"; - sudo umount -vf "$dataPath"; - sudo rm -rf "$mountPath" "$bootPath" "$dataPath"; + sudo bash -c 'umount -vf "$mountPath"; umount -vf "$bootPath"; umount -vf "$dataPath"; rm -rf "$mountPath" "$bootPath" "$dataPath";'; fi; popd > /dev/null;