mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[shell] Avoid hard-coded path (#5197)
Although the current hard-coded paths work on debian, they may fail on many other distros. Other distros may pack koreader based on the released deb file. I personally have problem using current script on nixos, as it does not use the paths `/bin/bash` and `/usr/lib/`.
This commit is contained in:
2
kodev
2
kodev
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CURDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
VERSION=$(git describe HEAD)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
export LC_ALL="en_US.UTF-8"
|
||||
|
||||
# writable storage: ${HOME}/.config/koreader.
|
||||
@@ -15,7 +15,7 @@ else
|
||||
fi
|
||||
|
||||
# working directory of koreader
|
||||
KOREADER_DIR="/usr/lib/koreader"
|
||||
KOREADER_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../lib/koreader"
|
||||
|
||||
# we're always starting from our working directory
|
||||
cd "${KOREADER_DIR}" || exit
|
||||
|
||||
Reference in New Issue
Block a user