Skip to content

Commit 804b8e4

Browse files
Update update script to use quoted install directory (#185)
1 parent 391a4b8 commit 804b8e4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

static/updatePanel.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ else
113113
echo "Checksum verified."
114114
fi
115115

116-
read -p "Do you want to delete all files and folders in $install_dir except the backup folder? (y/n) [y]: " delete_confirm
116+
read -p "Do you want to delete all files and folders in \"$install_dir\" except the backup folder? (y/n) [y]: " delete_confirm
117117
delete_confirm=${delete_confirm:-y}
118118
if [ "$delete_confirm" != "y" ]; then
119119
echo "Deletion canceled."
@@ -125,7 +125,7 @@ if [ $? -ne 0 ]; then
125125
echo "Failed to delete old files, aborting"
126126
exit 1
127127
fi
128-
echo "Deleted all files and folders in $install_dir except the backup folder."
128+
echo "Deleted all files and folders in \"$install_dir\" except the backup folder."
129129

130130
echo "Extracting tarball."
131131
tar -xzf panel.tar.gz -C "$install_dir"
@@ -163,7 +163,7 @@ if [ -f "$backup_dir/$db_database.backup" ]; then
163163
fi
164164
fi
165165

166-
cd $install_dir
166+
cd "$install_dir"
167167

168168
echo "Installing Composer"
169169
COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --optimize-autoloader --no-interaction
@@ -183,13 +183,13 @@ echo "Updating database"
183183
php artisan migrate --seed --force
184184

185185
echo "Setting Permissions"
186-
chmod_command="chmod -R 755 storage/* bootstrap/cache"
186+
chmod_command="chmod -R 755 \"$install_dir\"/storage/* \"$install_dir\"/bootstrap/cache"
187187
eval $chmod_command
188188
if [ $? -ne 0 ]; then
189189
echo "Failed to run chmod, Please run the following commands manually:"
190190
echo "sudo $chmod_command"
191191
fi
192-
chown_command="chown -R $owner:$group $install_dir"
192+
chown_command="chown -R $owner:$group \"$install_dir\""
193193
eval $chown_command
194194
if [ $? -ne 0 ]; then
195195
echo "Failed to run chown, Please run the following commands manually:"

0 commit comments

Comments
 (0)