mirror of
https://github.com/iridakos/goto.git
synced 2025-05-16 07:20:17 -07:00
Merge pull request #64 from vigo/fix-resolve-db
Add folder check and create before touch db
This commit is contained in:
commit
d288364550
4
goto.sh
4
goto.sh
@ -77,6 +77,10 @@ _goto_resolve_db()
|
|||||||
{
|
{
|
||||||
local CONFIG_DEFAULT="${XDG_CONFIG_HOME:-$HOME/.config}/goto"
|
local CONFIG_DEFAULT="${XDG_CONFIG_HOME:-$HOME/.config}/goto"
|
||||||
GOTO_DB="${GOTO_DB:-$CONFIG_DEFAULT}"
|
GOTO_DB="${GOTO_DB:-$CONFIG_DEFAULT}"
|
||||||
|
GOTO_DB_CONFIG_DIRNAME=$(dirname "$GOTO_DB")
|
||||||
|
if [[ ! -d "$GOTO_DB_CONFIG_DIRNAME" ]]; then
|
||||||
|
mkdir "$GOTO_DB_CONFIG_DIRNAME"
|
||||||
|
fi
|
||||||
touch -a "$GOTO_DB"
|
touch -a "$GOTO_DB"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user