We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 931296a commit 81cf978Copy full SHA for 81cf978
Microsoft/scripts/gen_modules_vhdx.sh
@@ -1,13 +1,13 @@
1
#!/bin/bash
2
set -ueo pipefail
3
4
-if [ $# -ne 2 ] || [ ! -d $1 ]; then
5
- printf "Usage ./$0 <modules dir> <output file>" 1>&2
+if [ $# -ne 2 ] || [ ! -d "$1" ]; then
+ printf '%s' "Usage ./$0 <modules dir> <output file>" 1>&2
6
exit 1
7
fi
8
9
-if [ -e $2 ]; then
10
- printf "Refusing to overwrite existing file $2" 1>&2
+if [ -e "$2" ]; then
+ printf '%s' "Refusing to overwrite existing file $2" 1>&2
11
exit 2
12
13
@@ -38,6 +38,6 @@ qemu-img convert -O vhdx "$tmp_dir/modules.img" "$2"
38
39
# Fix ownership since we're probably running under sudo
40
if [ -n "$SUDO_USER" ]; then
41
- chown "$SUDO_USER:$SUDO_USER" $2
+ chown "$SUDO_USER:$SUDO_USER" "$2"
42
43
0 commit comments