Fix Linux install script CWD check (#2775)

This commit is contained in:
virinci 2023-10-26 06:52:56 +05:30 committed by GitHub
parent 35be9a70da
commit 6e5edd94e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -143,10 +143,10 @@ Sam Waechter <github.com/swektr>
Michael Eliachevitch <m.eliachevitch@posteo.de> Michael Eliachevitch <m.eliachevitch@posteo.de>
Carlo Quick <https://github.com/CarloQuick> Carlo Quick <https://github.com/CarloQuick>
Dominique Martinet <asmadeus@codewreck.org> Dominique Martinet <asmadeus@codewreck.org>
Virinci
chandraiyengar <github.com/chandraiyengar> chandraiyengar <github.com/chandraiyengar>
user1823 <92206575+user1823@users.noreply.github.com> user1823 <92206575+user1823@users.noreply.github.com>
Gustaf Carefall <https://github.com/Gustaf-C> Gustaf Carefall <https://github.com/Gustaf-C>
virinci <github.com/virinci>
******************** ********************

View file

@ -2,7 +2,7 @@
set -e 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." echo "Please run from the folder install.sh is in."
exit 1 exit 1
fi fi
@ -13,7 +13,7 @@ fi
rm -rf "$PREFIX"/share/anki "$PREFIX"/bin/anki rm -rf "$PREFIX"/share/anki "$PREFIX"/bin/anki
mkdir -p "$PREFIX"/share/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 mkdir -p "$PREFIX"/bin
ln -sf "$PREFIX"/share/anki/anki "$PREFIX"/bin/anki ln -sf "$PREFIX"/share/anki/anki "$PREFIX"/bin/anki
# fix a previous packaging issue where we created this as a file # fix a previous packaging issue where we created this as a file