From 383cd44119c0a3c4aa3bdef867d22521cfea6d52 Mon Sep 17 00:00:00 2001 From: lolilolicon Date: Thu, 23 Sep 2021 01:20:53 +0000 Subject: [PATCH 1/3] Quote $PREFIX properly for paths with spaces --- qt/linux/install.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/qt/linux/install.sh b/qt/linux/install.sh index 5389c923a..6544990f0 100755 --- a/qt/linux/install.sh +++ b/qt/linux/install.sh @@ -11,20 +11,20 @@ if [ "$PREFIX" = "" ]; then PREFIX=/usr/local fi -rm -rf ${PREFIX}/share/anki ${PREFIX}/bin/anki -mkdir -p ${PREFIX}/share/anki -cp -av * ${PREFIX}/share/anki/ -mkdir -p ${PREFIX}/bin -ln -sf ${PREFIX}/share/anki/bin/Anki ${PREFIX}/bin/anki +rm -rf "$PREFIX"/share/anki "$PREFIX"/bin/anki +mkdir -p "$PREFIX"/share/anki +cp -av * "$PREFIX"/share/anki/ +mkdir -p "$PREFIX"/bin +ln -sf "$PREFIX"/share/anki/bin/Anki "$PREFIX"/bin/anki # fix a previous packaging issue where we created this as a file -(test -f ${PREFIX}/share/applications && rm ${PREFIX}/share/applications)||true -mkdir -p ${PREFIX}/share/pixmaps -mkdir -p ${PREFIX}/share/applications -mkdir -p ${PREFIX}/share/man/man1 -cd ${PREFIX}/share/anki && (\ -mv anki.xpm anki.png ${PREFIX}/share/pixmaps/;\ -mv anki.desktop ${PREFIX}/share/applications/;\ -mv anki.1 ${PREFIX}/share/man/man1/) +(test -f "$PREFIX"/share/applications && rm "$PREFIX"/share/applications)||true +mkdir -p "$PREFIX"/share/pixmaps +mkdir -p "$PREFIX"/share/applications +mkdir -p "$PREFIX"/share/man/man1 +cd "$PREFIX"/share/anki && (\ +mv anki.xpm anki.png "$PREFIX"/share/pixmaps/;\ +mv anki.desktop "$PREFIX"/share/applications/;\ +mv anki.1 "$PREFIX"/share/man/man1/) xdg-mime install anki.xml --novendor xdg-mime default anki.desktop application/x-colpkg From ae7693a8a7cfc6d386e7aed70d8ffc116766161a Mon Sep 17 00:00:00 2001 From: lolilolicon Date: Thu, 23 Sep 2021 01:24:52 +0000 Subject: [PATCH 2/3] Quote $PREFIX properly for paths with spaces --- qt/linux/uninstall.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/qt/linux/uninstall.sh b/qt/linux/uninstall.sh index 77b71db78..9e49ad71c 100755 --- a/qt/linux/uninstall.sh +++ b/qt/linux/uninstall.sh @@ -6,13 +6,13 @@ if [ "$PREFIX" = "" ]; then PREFIX=/usr/local fi -xdg-mime uninstall ${PREFIX}/share/anki/anki.xml || true +xdg-mime uninstall "$PREFIX"/share/anki/anki.xml || true -rm -rf ${PREFIX}/share/anki -rm -rf ${PREFIX}/bin/anki -rm -rf ${PREFIX}/share/pixmaps/anki.xpm -rm -rf ${PREFIX}/share/pixmaps/anki.png -rm -rf ${PREFIX}/share/applications/anki.desktop -rm -rf ${PREFIX}/share/man/man1/anki.1 +rm -rf "$PREFIX"/share/anki +rm -rf "$PREFIX"/bin/anki +rm -rf "$PREFIX"/share/pixmaps/anki.xpm +rm -rf "$PREFIX"/share/pixmaps/anki.png +rm -rf "$PREFIX"/share/applications/anki.desktop +rm -rf "$PREFIX"/share/man/man1/anki.1 echo "Uninstall complete." From 19bde7b52d4f89966c6ac21330bb2ee8a7393f41 Mon Sep 17 00:00:00 2001 From: lolilolicon Date: Fri, 24 Sep 2021 13:46:01 +0000 Subject: [PATCH 3/3] Update CONTRIBUTORS --- CONTRIBUTORS | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 74fd9e85a..d65037ccb 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -85,6 +85,7 @@ Hikaru Yoshiga Thore Tyborski Alexander Giorev Ren Tatsumoto +lolilolicon ********************