Skip to content

Commit d30ea7e

Browse files
authored
Merge pull request microsoft#64 from samueloph/samueloph_shellcheck
fix shellcheck reported problems
2 parents 4748bda + 1a5b618 commit d30ea7e

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

arch/install-config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# The configuration is adapted from the Ubuntu 16.04 script.
77
#
88

9-
if [ $(id -u) -ne 0 ]; then
9+
if [ "$(id -u)" -ne 0 ]; then
1010
echo 'This script must be run with root privileges' >&2
1111
exit 1
1212
fi

arch/makepkg.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This script is for Arch Linux to download and install XRDP+XORGXRDP
55
#
66

7-
if [ $(id -u) -eq 0 ]; then
7+
if [ "$(id -u)" -eq 0 ]; then
88
echo 'This script must be run as a non-root user, as building packages as root is unsupported.' >&2
99
exit 1
1010
fi
@@ -17,22 +17,22 @@ sudo pacman -Syu --needed --noconfirm base base-devel git
1717

1818
# Create a build directory in tmpfs
1919
TMPDIR=$(mktemp -d)
20-
pushd $TMPDIR
20+
pushd "$TMPDIR" || exit
2121

2222
###############################################################################
2323
# XRDP
2424
#
2525
(
2626
git clone https://aur.archlinux.org/xrdp.git
27-
cd xrdp
27+
cd xrdp || exit
2828
makepkg -sri --noconfirm
2929
)
3030
###############################################################################
3131
# XORGXRDP
3232
# Devel version, because release version includes a bug crashing gnome-settings-daemon
3333
(
3434
git clone https://aur.archlinux.org/xorgxrdp-devel-git.git
35-
cd xorgxrdp-devel-git
35+
cd xorgxrdp-devel-git || exit
3636
makepkg -sri --noconfirm
3737
)
3838
###############################################################################

ubuntu/16.04/config-user.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Major thanks to: http://c-nergy.be/blog/?p=10752 for the tips.
88
#
99

10-
if [ ! $(id -u) ]; then
10+
if [ ! "$(id -u)" ]; then
1111
echo 'This script must be run with root privileges' >&2
1212
exit 1
1313
fi

ubuntu/16.04/install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# Update our machine to the latest code if we need to.
1212
#
1313

14-
if [ $(id -u) -ne 0 ]; then
14+
if [ "$(id -u)" -ne 0 ]; then
1515
echo 'This script must be run with root privileges' >&2
1616
exit 1
1717
fi
@@ -48,7 +48,7 @@ if [ ! -d $XRDP_PATH ]; then
4848
fi
4949

5050
# Configure XRDP
51-
cd $XRDP_PATH
51+
cd $XRDP_PATH || exit
5252
./bootstrap
5353
./configure --enable-ipv6 --enable-jpeg --enable-fuse --enable-rfxcodec --enable-opus --enable-painter --enable-vsock
5454

@@ -121,7 +121,7 @@ if [ ! -d $XORGXRDP_PATH ]; then
121121
fi
122122

123123
# Configure XORGXRDP
124-
cd $XORGXRDP_PATH
124+
cd $XORGXRDP_PATH || exit
125125
./bootstrap
126126
./configure
127127

ubuntu/18.04/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# Update our machine to the latest code if we need to.
1212
#
1313

14-
if [ $(id -u) -ne 0 ]; then
14+
if [ "$(id -u)" -ne 0 ]; then
1515
echo 'This script must be run with root privileges' >&2
1616
exit 1
1717
fi

0 commit comments

Comments
 (0)