From b1d5e3c4f3392488058c524bbc4547c0e7363f18 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 28 Aug 2013 18:32:08 +0200 Subject: Create config dir if needed Signed-off-by: Florian Pritz --- fb.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fb.in b/fb.in index c271605..ccc6236 100644 --- a/fb.in +++ b/fb.in @@ -261,6 +261,9 @@ create_apikey() { status_code=`tail -n 1 "$tmpdir/api-result"` if [ "$status_code" == "200" ]; then + if [ ! -d "$XDG_CONFIG_HOME/fb-client/" ]; then + mkdir "$XDG_CONFIG_HOME/fb-client" + fi head -n 1 "$tmpdir/api-result" > "$apikey_file" return 0 fi -- cgit v1.2.3-24-g4f1b