Skip to content

Commit

Permalink
Don't use backticks for command substitution
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartpb committed Feb 6, 2015
1 parent 3c8af90 commit 4a82fe2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions bin/plushu
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ check_plushu_user () {
# If the PLUSHU_ROOT is not explicitly defined
if [[ -z "$PLUSHU_ROOT" ]]; then
# use PLUSHU_USER's home directory
PLUSHU_ROOT=`getent passwd "$PLUSHU_USER" | cut -d: -f6`
PLUSHU_ROOT=$(getent passwd "$PLUSHU_USER" | cut -d: -f6)
fi
}

Expand All @@ -17,7 +17,7 @@ if [[ -z "$PLUSHU_USER" ]]; then
# If PLUSHU_ROOT is explicitly defined
if [[ -n "$PLUSHU_ROOT" ]]; then
# Default to the owner of PLUSHU_ROOT
PLUSHU_USER=`ls -ld "$PLUSHU_ROOT" | cut -d' ' -f3`
PLUSHU_USER=$(ls -ld "$PLUSHU_ROOT" | cut -d' ' -f3)
# If PLUSHU_ROOT is not explicitly defined
else
# If the current user is root
Expand All @@ -28,7 +28,7 @@ if [[ -z "$PLUSHU_USER" ]]; then
# For any non-root user
else
# use the current user
PLUSHU_USER=`id -un`
PLUSHU_USER=$(id -un)
# use the current user's home as the default PLUSHU_ROOT
PLUSHU_ROOT=${PLUSHU_ROOT:-$HOME}
fi
Expand Down
6 changes: 3 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ elif command -v curl >/dev/null 2>&1; then
echo 'if you do, delete plugins/*, then rerun this installer to re-install'
echo 'these plugins via Git.'
if [[ ! -d "$PLUSHU_ROOT/plugins/plugins" ]]; then
curl `gh_archive plushu-plugins-plugin` |
curl $(gh_archive plushu-plugins-plugin) |
tar xzC "$PLUSHU_ROOT/plugins/plugins"
fi
if [[ ! -d "$PLUSHU_ROOT/plugins/help" ]]; then
curl `gh_archive plushu-help-plugin` |
curl $(gh_archive plushu-help-plugin) |
tar xzC "$PLUSHU_ROOT/plugins/help"
fi
if [[ ! -d "$PLUSHU_ROOT/plugins/version" ]]; then
curl `gh_archive plushu-version` |
curl $(gh_archive plushu-version) |
tar xzC "$PLUSHU_ROOT/plugins/version"
fi
else
Expand Down
2 changes: 1 addition & 1 deletion lib/plushook
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ elif [[ "${#hooks[@]}" != 0 ]]; then

# If we're supposed to multiplex stdin, save it to a temp file
if [[ -n "$input" ]]; then
input=`mktemp`;
input=$(mktemp);
cat >"$input"
fi

Expand Down
6 changes: 3 additions & 3 deletions lib/profile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ check_plushu_user () {
# If the PLUSHU_ROOT is not explicitly defined
if [[ -z "$PLUSHU_ROOT" ]]; then
# use PLUSHU_USER's home directory
PLUSHU_ROOT=`getent passwd "$PLUSHU_USER" | cut -d: -f6`
PLUSHU_ROOT=$(getent passwd "$PLUSHU_USER" | cut -d: -f6)
fi
}

Expand All @@ -14,7 +14,7 @@ if [[ -z "$PLUSHU_USER" ]]; then
# If PLUSHU_ROOT is explicitly defined
if [[ -n "$PLUSHU_ROOT" ]]; then
# Default to the owner of PLUSHU_ROOT
PLUSHU_USER=`ls -ld "$PLUSHU_ROOT" | cut -d' ' -f3`
PLUSHU_USER=$(ls -ld "$PLUSHU_ROOT" | cut -d' ' -f3)
# If PLUSHU_ROOT is not explicitly defined
else
# If the current user is root
Expand All @@ -25,7 +25,7 @@ if [[ -z "$PLUSHU_USER" ]]; then
# For any non-root user
else
# use the current user
PLUSHU_USER=`id -un`
PLUSHU_USER=$(id -un)
# use the current user's home as the default PLUSHU_ROOT
PLUSHU_ROOT=${PLUSHU_ROOT:-$HOME}
fi
Expand Down

0 comments on commit 4a82fe2

Please sign in to comment.