From c99aba0dff1d285c5105636b31cdecdd55615ab7 Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Sun, 19 Sep 2021 01:59:26 +0000 Subject: [PATCH] Desktop: Linux: Installer: properly quote variables (#5476) --- Joplin_install_and_update.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Joplin_install_and_update.sh b/Joplin_install_and_update.sh index e928adede..71043648a 100755 --- a/Joplin_install_and_update.sh +++ b/Joplin_install_and_update.sh @@ -137,8 +137,8 @@ fi #----------------------------------------------------- print 'Downloading Joplin...' TEMP_DIR=$(mktemp -d) -wget -O ${TEMP_DIR}/Joplin.AppImage https://github.com/laurent22/joplin/releases/download/v${RELEASE_VERSION}/Joplin-${RELEASE_VERSION}.AppImage -wget -O ${TEMP_DIR}/joplin.png https://joplinapp.org/images/Icon512.png +wget -O "${TEMP_DIR}/Joplin.AppImage" "https://github.com/laurent22/joplin/releases/download/v${RELEASE_VERSION}/Joplin-${RELEASE_VERSION}.AppImage" +wget -O "${TEMP_DIR}/joplin.png" https://joplinapp.org/images/Icon512.png #----------------------------------------------------- print 'Installing Joplin...' @@ -149,7 +149,7 @@ rm -f ~/.joplin/*.AppImage ~/.local/share/applications/joplin.desktop ~/.joplin/ mkdir -p ~/.joplin/ # Download the latest version -mv ${TEMP_DIR}/Joplin.AppImage ~/.joplin/Joplin.AppImage +mv "${TEMP_DIR}/Joplin.AppImage" ~/.joplin/Joplin.AppImage # Gives execution privileges chmod +x ~/.joplin/Joplin.AppImage @@ -159,7 +159,7 @@ print "${COLOR_GREEN}OK${COLOR_RESET}" #----------------------------------------------------- print 'Installing icon...' mkdir -p ~/.local/share/icons/hicolor/512x512/apps -mv ${TEMP_DIR}/joplin.png ~/.local/share/icons/hicolor/512x512/apps/joplin.png +mv "${TEMP_DIR}/joplin.png" ~/.local/share/icons/hicolor/512x512/apps/joplin.png print "${COLOR_GREEN}OK${COLOR_RESET}" # Detect desktop environment @@ -222,7 +222,7 @@ fi print "${COLOR_GREEN}Joplin version${COLOR_RESET} ${RELEASE_VERSION} ${COLOR_GREEN}installed.${COLOR_RESET}" # Record version -echo $RELEASE_VERSION > ~/.joplin/VERSION +echo "$RELEASE_VERSION" > ~/.joplin/VERSION #----------------------------------------------------- if [[ "$SHOW_CHANGELOG" == true ]]; then @@ -232,5 +232,5 @@ fi #----------------------------------------------------- print "Cleaning up..." -rm -rf $TEMP_DIR +rm -rf "$TEMP_DIR" print "${COLOR_GREEN}OK${COLOR_RESET}"