mirror of
https://github.com/Dushistov/sdcv.git
synced 2025-12-15 09:21:55 +00:00
18 lines
416 B
Bash
Executable File
18 lines
416 B
Bash
Executable File
#!/bin/sh
|
|
|
|
PATH_TO_SDCV="$1"
|
|
|
|
unset SDCV_PAGER
|
|
have=`"$PATH_TO_SDCV" --data-dir /tmp/bugagaga -l | wc -l`
|
|
#do not count header
|
|
have=$(($have-1))
|
|
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))
|
|
echo "test failed: sdcv says: we have: $have, but really we have: $ndicts" >&2
|
|
exit 1
|
|
fi
|
|
|
|
exit 0
|