Ensure that calcurse uses the right data and configuration directories depending on the conditions. Helped-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
13 lines
285 B
Bash
Executable File
13 lines
285 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. "${TEST_INIT:-./test-init.sh}"
|
|
dir=$(mktemp -d)
|
|
|
|
CALCURSE=$(readlink -f "$CALCURSE")
|
|
cd "$dir"
|
|
(unset -v HOME XDG_DATA_HOME XDG_CONFIG_HOME; "$CALCURSE" -a)
|
|
[ -f "$dir/.calcurse/apts" ] && [ -f "$dir/.calcurse/conf" ] && failed=0 || failed=1
|
|
|
|
rm -rf "$dir"
|
|
exit "$failed"
|