From 6e5edd94e07a9c8598b92c714aa61aafc3a4ba54 Mon Sep 17 00:00:00 2001 From: virinci Date: Thu, 26 Oct 2023 06:52:56 +0530 Subject: [PATCH] Fix Linux install script CWD check (#2775) --- CONTRIBUTORS | 2 +- qt/bundle/lin/install.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 2d2f53365..60183173f 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -143,10 +143,10 @@ Sam Waechter Michael Eliachevitch Carlo Quick Dominique Martinet -Virinci chandraiyengar user1823 <92206575+user1823@users.noreply.github.com> Gustaf Carefall +virinci ******************** diff --git a/qt/bundle/lin/install.sh b/qt/bundle/lin/install.sh index db69b6323..519a45fa2 100755 --- a/qt/bundle/lin/install.sh +++ b/qt/bundle/lin/install.sh @@ -2,7 +2,7 @@ set -e -if ! test -f install.sh; then +if [ "$(dirname "$(realpath "$0")")" != "$(realpath "$PWD")" ]; then echo "Please run from the folder install.sh is in." exit 1 fi @@ -13,7 +13,7 @@ fi rm -rf "$PREFIX"/share/anki "$PREFIX"/bin/anki mkdir -p "$PREFIX"/share/anki -cp -av --no-preserve=owner,context * "$PREFIX"/share/anki/ +cp -av --no-preserve=owner,context -- * "$PREFIX"/share/anki/ mkdir -p "$PREFIX"/bin ln -sf "$PREFIX"/share/anki/anki "$PREFIX"/bin/anki # fix a previous packaging issue where we created this as a file