When using sudo, make sure each command is prefixed

If `sudo` is used, packing all commands into one line, using `&&` won't work except for the first command. This fixes the problem.