mirror of
https://github.com/Dushistov/sdcv.git
synced 2025-12-15 17:31:56 +00:00
Comply with the XDG Base Directory Specification
This commit is contained in:
BIN
tests/stardict-test_synonyms-2.4.2/test.idx.oft
Normal file
BIN
tests/stardict-test_synonyms-2.4.2/test.idx.oft
Normal file
Binary file not shown.
@@ -6,7 +6,7 @@ unset SDCV_PAGER
|
||||
have=`"$PATH_TO_SDCV" --data-dir /tmp/bugagaga -l | wc -l`
|
||||
#do not count header
|
||||
have=$(($have-1))
|
||||
ndicts=`find "${HOME}"/.stardict/dic -name "*.ifo" -print | wc -l`
|
||||
ndicts=`find "${XDG_DATA_HOME:-$HOME/.local/share}"/stardict/dic -name "*.ifo" -print | wc -l`
|
||||
#ndicts=$(($ndicts+1))
|
||||
if [ $have -ne $ndicts ]; then
|
||||
ndicts=$(($ndicts-1))
|
||||
|
||||
@@ -4,7 +4,7 @@ PATH_TO_SDCV="$1"
|
||||
ndicts=`"$PATH_TO_SDCV" -l | wc -l`
|
||||
ndicts=$(($ndicts-1))
|
||||
ncom=`find /usr/share/stardict/dic -name "*.ifo" | wc -l`
|
||||
nspe=`find "${HOME}"/.stardict/dic -name "*.ifo" | wc -l`
|
||||
nspe=`find "${XDG_DATA_HOME:-$HOME/.local/share}"/stardict/dic -name "*.ifo" | wc -l`
|
||||
nmy=$(($ncom+$nspe))
|
||||
|
||||
if [ $nmy -ne $ndicts ]; then
|
||||
|
||||
@@ -5,8 +5,8 @@ set -e
|
||||
PATH_TO_SDCV="$1"
|
||||
TESTS_DIR="$2"
|
||||
|
||||
mkdir -p "${HOME}"/.stardict/dic
|
||||
cp -R "${TESTS_DIR}/stardict-test_dict-2.4.2" "${HOME}"/.stardict/dic
|
||||
mkdir -p "${XDG_DATA_HOME:-$HOME/.local/share}"/stardict/dic
|
||||
cp -R "${TESTS_DIR}/stardict-test_dict-2.4.2" "${XDG_DATA_HOME:-$HOME/.local/share}"/stardict/dic
|
||||
unset SDCV_PAGER
|
||||
RES=`"$PATH_TO_SDCV" -n -u test_dict test | grep "test passed"`
|
||||
|
||||
@@ -15,6 +15,6 @@ if [ -z "$RES" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -fr "${HOME}"/.stardict/dic/stardict-test_dict-2.4.2
|
||||
rm -fr "${XDG_DATA_HOME:-$HOME/.local/share}"/stardict/dic/stardict-test_dict-2.4.2
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -4,9 +4,8 @@ set -e
|
||||
|
||||
PATH_TO_SDCV="$1"
|
||||
TESTS_DIR="$2"
|
||||
|
||||
mkdir -p "${HOME}"/.stardict/dic
|
||||
cp -R "${TESTS_DIR}/rus-eng-stardict-2.4.2" "${HOME}"/.stardict/dic/
|
||||
mkdir -p "${XDG_DATA_HOME:-$HOME/.local/share}"/stardict/dic
|
||||
cp -R "${TESTS_DIR}/rus-eng-stardict-2.4.2" "${XDG_DATA_HOME:-$HOME/.local/share}"/stardict/dic/
|
||||
|
||||
unset SDCV_PAGER
|
||||
export LANG=ru_RU.KOI8-R
|
||||
|
||||
Reference in New Issue
Block a user