mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-04-15 23:47:24 +02:00
Fixed SC2086: Double quote to prevent globbing and word splitting.
This commit is contained in:
committed by
Joshua Tauberer
parent
133bae1300
commit
30c4681e80
@@ -51,7 +51,7 @@ if [[ $EUID -ne 0 ]]; then
|
||||
fi
|
||||
|
||||
# Clone the Mail-in-a-Box repository if it doesn't exist.
|
||||
if [ ! -d $HOME/mailinabox ]; then
|
||||
if [ ! -d "$HOME/mailinabox" ]; then
|
||||
if [ ! -f /usr/bin/git ]; then
|
||||
echo Installing git . . .
|
||||
apt-get -q -q update
|
||||
@@ -63,24 +63,24 @@ if [ ! -d $HOME/mailinabox ]; then
|
||||
SOURCE=https://github.com/mail-in-a-box/mailinabox
|
||||
fi
|
||||
|
||||
echo Downloading Mail-in-a-Box $TAG. . .
|
||||
echo "Downloading Mail-in-a-Box $TAG. . ."
|
||||
git clone \
|
||||
-b $TAG --depth 1 \
|
||||
$SOURCE \
|
||||
$HOME/mailinabox \
|
||||
-b "$TAG" --depth 1 \
|
||||
"$SOURCE" \
|
||||
"$HOME/mailinabox" \
|
||||
< /dev/null 2> /dev/null
|
||||
|
||||
echo
|
||||
fi
|
||||
|
||||
# Change directory to it.
|
||||
cd $HOME/mailinabox
|
||||
cd "$HOME/mailinabox"
|
||||
|
||||
# Update it.
|
||||
if [ "$TAG" != $(git describe --always) ]; then
|
||||
echo Updating Mail-in-a-Box to $TAG . . .
|
||||
git fetch --depth 1 --force --prune origin tag $TAG
|
||||
if ! git checkout -q $TAG; then
|
||||
echo "Updating Mail-in-a-Box to $TAG . . ."
|
||||
git fetch --depth 1 --force --prune origin tag "$TAG"
|
||||
if ! git checkout -q "$TAG"; then
|
||||
echo "Update failed. Did you modify something in $(pwd)?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user